ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help regarding SMTP Email Send Message

Hello everyone,

 

i am working on the SMTP Email Send Message using labview .  i have connected the terminals as suggested in the Context Help and i can run the VI but a keep getting a lot of errors.

 

Needless to say i cant send the mail .

 

i have enclosed the vi , shall be grateful if somone can suggest any modifications so that the VI works.

 

I have also seen the GMAIL.vi but dont want to use as it seems complicated. 

 

Thanks in advance 

0 Kudos
Message 1 of 15
(4,865 Views)

Hi Sindhurakshak,

 

I have checked the code and it's working fine for me. I think the problem is with your SMTP server. Please check SMTP server name adn try it it should work. 

For shake of testing I have changed the SMTP server name and it works fantastic.

 

Thanks

Message 2 of 15
(4,845 Views)

hello Pankajusic,

 

Thanks for reviewing the code. 

 

 i was under the notion that the SMTP Server remains the same for a given company . For example, for google it is smtp.gmail.com and the like.

 

Request you to post your vi with the modifications you have made. 

 

Further , how i can i find my SMTP server name ?

 

I am using LabVIEW 2011.

 

Regards

 

Jalashwa 

0 Kudos
Message 3 of 15
(4,833 Views)

Are you sure Gmail's server will take SMTP mail?  I don't think it does because it would be and easy gateway for spam.

 

You need your company's e-mail server, and them set up to allow you to give it smtp mail based on that fact they should have already authenticated your PC on their domain.

Message 4 of 15
(4,831 Views)

Hello Ravens Fan,

 

i delved more into SMTP in Google and found out the following steps:

  1. Open up a command prompt (CMD.exe)
  2. Type nslookup and hit enter
  3. Type set type=MX and hit enter
  4. Type the domain name and hit enter, for example: google.com
  5. The results will be a list of host names that are set up for SMTP

I am attaching a pic of my cmd after executing the steps. I updated the mail server in the SMTP Email Send Message block diagram and i got an error. i have also attached the pic for that 

 

It would be very kind of you if you could guide me through 

 

Regards

Jalashwa

 

Download All
0 Kudos
Message 5 of 15
(4,821 Views)

@RavensFan wrote:

Are you sure Gmail's server will take SMTP mail?  I don't think it does because it would be and easy gateway for spam.

 

You need your company's e-mail server, and them set up to allow you to give it smtp mail based on that fact they should have already authenticated your PC on their domain.


A little off track with regard to solving the specific problem, but to answer RavensFan's point:

Yes, Gmail does allow you to use SMTP. This is how you use other email clients (Outlook, Thunderbird etc) to send/receive things from your gmail account.

(a quick Google confirms this).

0 Kudos
Message 6 of 15
(4,813 Views)

Hi, 

 

I have chnaged smtp  name as per our company mail server and it's worked fine. that is the only chnge i did there.

 

I found something on internet that might help you.

 

https://forums.ni.com/t5/Example-Code/GMAIL-vi/ta-p/3996207

 

Thanks

pankaj 

0 Kudos
Message 7 of 15
(4,784 Views)

In order to use Google's SMTP server function, you must authenticate using TLS/SSL.

 

The LabVIEW SMTP functions are natively written in LabVIEW and have no support for TLS/SSL.

 

 

 

0 Kudos
Message 8 of 15
(4,775 Views)

thanks for the info ,

 

i have tried others like yahoo and rediff.com but i just cant get over the errors i am getting 

 

Regards

0 Kudos
Message 9 of 15
(4,763 Views)

@PhillipBrooks wrote:

In order to use Google's SMTP server function, you must authenticate using TLS/SSL.

 

The LabVIEW SMTP functions are natively written in LabVIEW and have no support for TLS/SSL. 

 


That document is out of date.  LabVIEW 2013 has had email VIs revamed tp support TLS.  I've not used these but remember it from the release notes.

 

https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/menus/categories/data-communication/protoc...

 

Message 10 of 15
(4,757 Views)