06-14-2010 11:25 PM - edited 06-14-2010 11:34 PM
I found these two useful vi example to send smtp email using Labview:
http://decibel.ni.com/content/docs/DOC-7451
http://decibel.ni.com/content/docs/DOC-2401
However, I got error 1172 saying "No connection could be made because the target machine actively refused it 74.125.91.109:587". I'm using gmail to send emails and pretty sure that all the settings in the VI are correct. According to http://mail.google.com/support/bin/answer.py?answer=13287, I tried both 587 and 465 as the port, and nothing would help. 587 will give the 1172 error and 465 will hang the vi for a while after stopping it. This 1172 error is unlikely due to the suggestion from the 2nd link, "Note: If you receive Error -1172 with this example, try logging into the Gmail account with your browser. This error can occur with Gmail accounts that have been inactive for a period of time. You must log in with a browser and verify CAPTCHA text to reactivate the account." because the error kept on even when I login to my gmail account.
I got myself a solution from http://stackoverflow.com/questions/2737823/unable-to-send-smtp-mail-with-net-network-issue, which says to turn off the antivirus software. I turned off McAfee on my PC and it did work. Now, I'm able to send email, even when I log out my account. However, I'm not happy since I have to keep my antivirus off. My question is, is there any way to walk around this issue? i.e. being able to send email with antivirus on?
My 2nd question: how to send message to multiple recipients? The string array to the "recipient" does not work, and the form of "xxx@xxx.com;yyy@yyy.com" does not work neither. Do I have to create multiple property nodes for the recipients or better way to do it?
Many thanks
06-15-2010 02:50 PM
Hi holyna,
1. There should be an option in McAfee to enable specific ports, you'll probably need to ask them on how to do this.
2. You'll need to use the a To, CC, or BCC object with the Add method for each address you want to add to the message. This will use the example in the 2nd link that you added.
06-15-2010 03:25 PM
Our IT department fixed a similar issue for our lab. They had to enable a feature that allows a non-recognized program to send email, because it is expecting only Outlook to send email. Our emails are flying out of LabVIEW OK now.
06-15-2010 11:48 PM
Thanks Kyle and Broken arrow. I'm not sure if McAfee would give me some solution, but I will give them a try. Broken arrow, would you mind to ask your IT staff how they solved this issue? Or is there a person I can contact to get the solution? Suppose I'm using this function at home, I don't think the internet carrier would help much.
Thanks,
06-15-2010 11:49 PM
03-13-2013 12:40 AM
hi i am bhuvanesh and i am trying to use those two vi's on my project. the same error code i am getting. idon't know what's my problem suggest me an option and i wish to know the sms gateway mail which offers the option for sending sms throughout the world. suggest me an option.
03-13-2013 04:01 PM
Hi Bhuvanesh,
I noticed that the original thread here hasn't been updated in over a year. In the future, it will be helpful if you begin a new topic for your issue.
I will first address your second question concerning sending SMS messages using LabVIEW. The only way LabVIEW can send an SMS text message is by passing an e-mail to the appropriate SMS gateway service. This gateway will vary by cellular provider. You will need to obtain the SMS gateway service information for each carrier you wish to push text messages to.
As far as the error you are receiving, we will need more information in order to narrow down your problem. What is the exact error message you're receiving? Are you receiving "1172: No connection..." or some other variation? A screen capture of your code would also be very useful.
Regards,
Andy C.
Applications Engineering
National Instruments