SendEmail reliability issues?

I’m experiencing some phenomena with the SendEmail (Network) plugin which I cannot explain. Not all emails seem to be sent, even though the success pin is showing a happy 1.
TTY says the following:

01:14:04     : System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.Sockets.SocketException: An invalid argument was supplied
   at System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.End(IAsyncResult result)
   at System.Net.Mail.SmtpClient.ConnectCallback(IAsyncResult result)
   --- End of inner exception stack trace ---

Sometimes it works and one minute later it does not work, with exactly the same inputs.
Switching off the ‘accept html’ pin and switching it back on 5 seconds later seems to make it work again.

The email I’m sending is a rather complex HTML file (based on http://zurb.com/ink/ ), could that be an issue?

Any ideas? Cheers!

This could !MAYBE! relate to the smtp server not being reachable. Have you tried disabling firewall, checking connections? Are you using gmail or other public servers? Maybe connection is blocked server wise? Maybe try other Port / check if you use the Port in other context?
You could also try sending without html but same mail server and see if the problem still is same to check connection / html issue.

Just some suggestions

It was my own email account, hosted on some shared hosting. Never had trouble with it in normal use. No SSL switched on.
I’m trying gmail (incl SSL) now, but the issue seems to be the same. Random dropouts while it worked before and works again after them…

00:03:25     : Message sent.
00:04:18     : System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.Sockets.SocketException: An invalid argument was supplied
   at System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.End(IAsyncResult result)
   at System.Net.Mail.SmtpClient.ConnectCallback(IAsyncResult result)
   --- End of inner exception stack trace ---
00:04:30     : Message sent.
00:04:43     : Message sent.
00:04:57     : Message sent.
00:05:15     : Message sent.

Unfortunately the success pin doesn’t seem to be a reliable indicator. It sometimes goes straight to 1 after hitting send. Error message takes a few seconds, pin stays at 1.

perhaps, you can send the email in (b)cc to yourself and check if it arrived?

The success pin will always be true when sending…
this could easily be changed by modifying this function

void EmailClient_SendCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
        {
            // Get the unique identifier for this asynchronous operation.
            int index = (int)e.UserState;

            if (e.Cancelled)
            {
                FError = "Cancelt";
            }
            if (e.Error != null)
            {
                FError = e.Error.ToString();
            }
            else
            {
                FError = "Message sent.";
            }

            FPinOutSuccess[index](index) = true;
        }

Maybe something for next addonpack changes. Then you could try a resend to circumvent the error, not a real solution - but its hard to tell what the exact error could be otherwise, as the email node uses plain .NET Email functionality.

I would also suggest to add Names to the sender, as i read somewhere that this can help to avoid landing in spam and it is a nice feature.

Besides that, did you try with a plain text mail to see if problem still exists?
Do you send an image which maybe is not readable?

To find exact error maybe also provide html code and small patch to test

https://github.com/ethermammoth/VVVV.Nodes.Email/blob/master/Nodes/SendEmailNode.cs

Some Links that are interesting when sending automated HTML emails

http://kb.mailchimp.com/article/how-spam-filters-think/

http://www.andreas-kraus.net/blog/tips-for-avoiding-spam-filters-with-systemnetmail/