LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to send an email from a VI

Solved!
Go to solution
Your VI works for me, both Gmail and our internal server. You might have firewall issues, assuming you have given it a proper IP address.
Richard






Message 31 of 50
(5,117 Views)
You are trying to send email via Gmail. The SMTP VIs that ship with LabVIEW will not work. Gmail uses SSL, and requires authentication. You will have to use either the .NET solution that has already been posted, or you will have to use the OpenG SMTP VIs as I mentioned before.
Message 32 of 50
(5,115 Views)

Sending to Gmail works for me.

gmail.gif

 

Richard






Message 33 of 50
(5,107 Views)

You are not trying to use Gmail as your SMTP server. You are using what appears to be your own internal SMTP server.

 

There is a big difference between sending email to Gmail, as opposed to sending it via Gmail.

Message Edited by smercurio_fc on 09-16-2009 03:41 PM
Message 34 of 50
(5,101 Views)

smercurio_fc wrote:

 

There is a big difference between sending email to Gmail, as opposed to sending it via Gmail.



OK, just wanted to make it clear (to me), thanks. It looked like that's what the OP was doing, sending email to Gmail, but I didn't have all of his VI's.

Message Edited by Broken Arrow on 09-16-2009 04:57 PM
Richard






Message 35 of 50
(5,087 Views)
Solution
Accepted by topic author prashiit

In LabVIEW 8.6 , there is no native support for sending Email via servers that require authentication;  the built-in SMTP vis only work with open servers. Severs like gmail server are authenticated. So vis provided in LabVIEW will not be able to send it through gmail.

The Microsoft .NET platform does, however, provide a fairly straightforward interface for sending authenticated Email, which LabVIEW can interface with.  The methods to do so exist within the System.SmtpClient class;  see attached vi for an example that has been pre-configured to send Email via GMAIL accounts.

 

Regards,

Hardik Asawa

Message 36 of 50
(5,062 Views)
Technically, the solution had already been posted all the way back by Harold in the very first reply to this thread.
0 Kudos
Message 37 of 50
(5,037 Views)

I've been following this thread as I'm trying to send an email through LabVIEW using Gmail. I've tried all the possible solutions and I still receive the 1172 error. I've tried logging into the Gmail account, leaving the account open and also logging out of the email account -- but still the same error. Any ideas of what I can troubleshoot on for this error?

Thanks,

Vickie

 

I'm using LabVIEW 8.6.1 and have tried the Gmail send.vi and GmailL V86.vi files posted in this thread.

Message Edited by Vickie on 09-17-2009 10:36 AM
0 Kudos
Message 38 of 50
(5,019 Views)

Vickie wrote: 

I'm using LabVIEW 8.6.1 and have tried the Gmail send.vi and GmailL V86.vi files posted in this thread.


The VI posted by Hardik is virtually the same as the one posted by Harold in the very first reply to this thread, and it's the same as the one here, so they will all do the same thing.

 

This shouldn't matter, but what version of .NET do you have installed on your computer? Are you setting the sender email address to be the same as the Gmail account ID? You may need to run the VI in highlight mode to determine in which node the error is being generated.

0 Kudos
Message 39 of 50
(5,000 Views)

I looked in Add/Remove Programs and the following are listed:

Microsoft .NET Framework 2.0 Service Pack 2

Microsoft .NET Framework 3.0 Service Pack 2

Microsoft .NET Framework 3.5 SP1

 

In highlight mode, the VI runs fine until it hits: SmtpClient.Send(MailMessage message)

 

I set the sender email to be the same as the Gmail account ID. I've played around with the Gmail account ID being the login and the full email (with @gmail.com) but no change.

 

Thanks,

Vickie

0 Kudos
Message 40 of 50
(4,994 Views)