NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending email issue with larger attachments

Hey all,

 

I am currently working on a VI that I want to use to send an email of a data base weekly to an email recipient.  I found a nice example that uses gmail as the SMTP and I have it working nicely for smaller attachments(less that 1MB attachments).  When I try to attach anything larger than that it runs for about 30 seconds then comes up with the 

 

Error 1172 occurred at Error calling method System.Net.Mail.SmtpClient.Send, (System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. Inner Exception: System.Net.Mail.SmtpException: The operation has timed out.)

 

At first when this 1172 error occurred it was because I did not have port 587 open in the firewall settings.  Once I did that I was able to send emails successfully(with smaller attachments)  I did get a 2MB file to send twice out of like 5 attempts.  The other attempts timed out.

 

What is the timed out timing on this issue.  I think if I can put in a wait or some way of letting the attachment load it will not time out on me.  

 

Attached is the gmail.VI I am using along with the send_DB_Email.VI that uses the GmaiLV86.VI

 

Regards,

 

Steve

 

 

0 Kudos
Message 1 of 4
(4,471 Views)

Here's my other VI that runs the GmaiL one.  Some reason only one posted.

0 Kudos
Message 2 of 4
(4,467 Views)

This seems like a question that would be better suited for the LabVIEW forum.

 

It appears as though the default timeout is set to 100 seconds.

 

http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.timeout.aspx?cs-save-lang=1&cs-la...

 

You could try to modify the timeout and see what luck you have.  My only doubt here is that you are claiming issues after about 30 seconds.  I attached and example of how you would change the timeout time.

Herrlin

Just trying to spread the LabVIEW love.
0 Kudos
Message 3 of 4
(4,448 Views)

hellow!

well thats a bummer... i used to have trouble send attachements, but since dropbox came out its all good now. if you are too lazy to get using dropbox you can alawys upload it to some provider,

i think http://emailattachment.net/ specialises in this...

hope it helps 🙂

regards

0 Kudos
Message 4 of 4
(4,309 Views)