eerc Posted February 20, 2006 Report Share Posted February 20, 2006 hello, I develop an application, that has to inform the administrator for email and sms when a value surpasses a limit. How do I do to send email and sms with the labview? :headbang: Help... Quote Link to comment
Khalid Posted February 20, 2006 Report Share Posted February 20, 2006 What version of LabVIEW are you using? If you have 7.1 (and 7.0?), there are SMTP-based Mail VIs under the Communication palette. If you're using older versions, you will need the Internet Toolkit from NI. You could also check out the OpenG for these features. -Khalid Quote Link to comment
eerc Posted February 21, 2006 Author Report Share Posted February 21, 2006 I am to use the version 7.1. Did I try to use smtp of the labview (the examples) but don't I get to send email??? And on, to send sms?? Thank you Quote Link to comment
Khalid Posted February 21, 2006 Report Share Posted February 21, 2006 I am to use the version 7.1. Did I try to use smtp of the labview (the examples) but don't I get to send email??? Do you get any errors from the Email VI? -Khalid Quote Link to comment
Rolf Kalbermatter Posted February 21, 2006 Report Share Posted February 21, 2006 I am to use the version 7.1. Did I try to use smtp of the labview (the examples) but don't I get to send email??? And on, to send sms?? Considering that the SMTP VIs are with full source code you could certainly go a little deeper and single step into them to see what the problem is. The SMTP VIs as they come with LabVIEW 7.x and higher work very good but have a few limitations. First they have no support for authentification. If your SMTP server requires authentification then you will have to look for alternatives. Second they can NOT make a hole into your firewall on their own, both on your computer nor some gateway on the way to your SMTP server. You will have to configure the firewall(s) to allow the SMTP traffic to go through. Sending SMSs is a completely different story. You can directly communicate with the GSM modem through VISA and the serial port but not every GSM modem has exactly the same command set. Also to get a reliable communication with a GSM modem that does always work independant of the initial state of the modem is quite some work. I have done it in an alarming and messaging application for Wismo GSM chip based modems (Wavecom and Maestro) and it wasn't trivial. Our company also sells a Toolkit to talk to these modems http://www.citengineering.com/pagesEN/products/sms.aspx Another possibility is to buy some ready to run SMS application and install it and interface to it through ActiveX, TCP/IP or whatever it supports. If your messaging and alarming should be reliable writing your own solution won't be a very straightforward and fast way to do it. Rolf Kalbermatter Quote Link to comment
eerc Posted February 22, 2006 Author Report Share Posted February 22, 2006 hello Khalid Ansari, I am to use the example (Email Notification.vi), to understand as doing. The errors is in the connection mail server. The errors i: " Could not establish connection with.. Error 62 ". What am to do wrong? Thank you Hugo Fernandes Quote Link to comment
eerc Posted February 22, 2006 Author Report Share Posted February 22, 2006 hello Rolf Kalbermatter, Thank you for having answered, I am an electr Quote Link to comment
eerc Posted February 23, 2006 Author Report Share Posted February 23, 2006 Hello Khalid Ansari, I receive email with the labview. I connect the email server to receive the email, I make authentication and I introduce the password. Will it be that have authentication/password with server smtp? But with VI smtp of the to do that? thank you Quote Link to comment
Khalid Posted February 23, 2006 Report Share Posted February 23, 2006 It's obvious that LabVIEW is not able to connect to your mail server. Can you send/receive mail from this computer using any other mail client via the same SMTP server? -Khalid Quote Link to comment
Rolf Kalbermatter Posted February 23, 2006 Report Share Posted February 23, 2006 Hello Khalid Ansari, I receive email with the labview. I connect the email server to receive the email, I make authentication and I introduce the password. Will it be that have authentication/password with server smtp? But with VI smtp of the to do that? thank you Receiving email is done with the POP3 protocol (or some more advanced one). There authentification is always necessary since you can look into the mail box of a person. To send emails you are using an entirely different protocol called SMTP. SMTP is completely independant of POP3 and had traditionally no need for authentification before the sh*theads of spammers started to poisen email.I'm not sure where you got the POP3 VIs though, maybe the Internet Toolkit or OpenG, because LabVIEW does NOT come with POP3 VIs out of the box. The LabVIEW email VIs implement the SMTP protocol but without support for authentification. But since you get error 62 I think it is likely that you don't even get the the point where authentification is required but rather that a firewall or something like that is dropping your connection immediately. This is: 1) A problem most likely entirely out of control of LabVIEW, eg. your network setup. 2) Something you will need to investigate by debugging into the LabVIEW VIs (single step mode, etc. etc.) 3) By going into the email subVIs you can also see what the server is answering if any and only with that detailed information is any chance that someone else here can help you. Rolf Kalbermatter Quote Link to comment
eerc Posted February 23, 2006 Author Report Share Posted February 23, 2006 Hello rolfk, Thank you for having answered. I to use the following example. Because it is that don't get to send the email? I already turned off firewall. Thank you Download File:post-4102-1140713695.llb Quote Link to comment
Rolf Kalbermatter Posted February 25, 2006 Report Share Posted February 25, 2006 Hello rolfk, Thank you for having answered. I to use the following example. Because it is that don't get to send the email? I already turned off firewall. Thank you Download File:post-4102-1140713695.llb This code looks a little hairy and I have no interest in trying to research what it does exactly. Just use the SMTP VIs that come with LabVIEW under Communication->SMTP Email instead. Rolf Kalbermatter Quote Link to comment
eerc Posted February 25, 2006 Author Report Share Posted February 25, 2006 oi Rolf Kalbermatter, I made the following example. I used them VI, continues to give a error. Don't I know the one what to do more??!! help, please Download File:post-4102-1140896678.vi Quote Link to comment
Rolf Kalbermatter Posted February 26, 2006 Report Share Posted February 26, 2006 oi Rolf Kalbermatter,I made the following example. I used them VI, continues to give a error. Don't I know the one what to do more??!! help, please Are you now using the standard SMTP VIs that come with LabVIEW? What error do you get? In what low level VI (connection, when writing which command, when receiving after which commmand)? What LabVIEW version, which OS version, what email server,...... ? Rolf Kalbermatter Quote Link to comment
eerc Posted March 3, 2006 Author Report Share Posted March 3, 2006 Hello, Yes, I using the standard SMTP VIs that come with LabVIEW. I have the following error: " code : 56 source : TCP Open Connection in NI_SMTPEmail.lvlib:SMTP Email Open Session.vi:3->NI_SMTPEmail.lvlib:SMTP Email Send Message Charset.vi:2->NI_SMTPEmail.lvlib:SMTP Email Send Message.vi:1->testesend email.vi " what happens? Thank you Quote Link to comment
Rolf Kalbermatter Posted March 9, 2006 Report Share Posted March 9, 2006 Hello, Yes, I using the standard SMTP VIs that come with LabVIEW. I have the following error: " code : 56 source : TCP Open Connection in NI_SMTPEmail.lvlib:SMTP Email Open Session.vi:3->NI_SMTPEmail.lvlib:SMTP Email Send Message Charset.vi:2->NI_SMTPEmail.lvlib:SMTP Email Send Message.vi:1->testesend email.vi " what happens? Thank you Either your TCP/IP address/name is not valid, your email server is not setup to listen at the standard SMTP port number or your network setup does not allow LabVIEW to connect to the computer where your server is installed. error 56 means timeout error so LabVIEw sends out a request for computer xy to accept a connection at port zz and never gets a reaction from there. This definitely is an error completely outside of LabVIEW. Try to ping the computer your SMTP server is installed on with exactly the same TCP/IP adress/name. If this doesn't work your address is wrong or a firewall disallows the traffic. If pinging works then again a firewall may be the problem disallowing specific traffic such as through SMTP ports or your SMTP server is not running or it is listening on another port than the standard port 25. Rolf Kalbermatter Quote Link to comment
eerc Posted March 14, 2006 Author Report Share Posted March 14, 2006 Thank you Rolf, I already send email How do I do to send sms? And possible to send sms with labview? Thank Hugo Fernandes Quote Link to comment
Mike C Posted March 16, 2006 Report Share Posted March 16, 2006 And possible to send sms with labview?Thank Hugo Fernandes Hugo, I was looking to do the same thing some time ago but I had to postpone that project. I did find some information on the NI Knowledge base that may give you some direction: "Problem: Can LabVIEW send a text message to my mobile phone email address? Solution: LabVIEW can indirectly send text messages to a cellular phone with the SMTP E-Mail VI Quote Link to comment
Phillip Brooks Posted March 17, 2006 Report Share Posted March 17, 2006 ...SMTP E-Mail VI Quote Link to comment
peteski Posted March 18, 2006 Report Share Posted March 18, 2006 I'm a .NET curious kind of guy, and the Enterprise Connectivity Toolkit is an optional library, so I looked into .NET and was able to send mail with the attached VI. Note that this uses .NET 2.0 ( Thus requires LV 8 or LV7.1.1 with patches).If your SMTP server requires authentication, you may need to make changes. Download File:post-949-1142621496.viDownload File:post-949-1142621933.vi pbrooks, I'm looking foreward to checking these out when I get back to work on Monday. I use the Enterprise Connectivity Toolkit for this sort of thing in one aplication right now, but a trick like this could be very useful in places that have not purchased that toolkit. As an aside, a long time ago in a job far far away, I developed a labview vi which allowed to do TAP/IXO protocol, which is what alpha-numeric pagers use to use. I gotta say that it was a fun thing to do, I loved the following part of the protocol documentation that I found on the net: TRANSCRIBER'S FOOTNOTES: {1} It lies. All the way through this document, it lies. Gotta love truth in advertising... when you can get it, that is... -Pete Liiva Quote Link to comment
eerc Posted March 24, 2006 Author Report Share Posted March 24, 2006 hello Mike C, Thank you for the explanation. Then it is possible send sms indirectly with Labview, through one SMS gateway. thank you, Mike C Quote Link to comment
syiling Posted May 25, 2006 Report Share Posted May 25, 2006 Do you get any errors from the Email VI? -Khalid hi.. I am a beginner in labview. I recently came across with the SMTP_email.vi example posted by eerc. I had tried it out, but I encountered a problem. Does the mail server meansthat the server used in microsoft office outlook ? let's say I am using the microsoft outlook to send or receive email, so may I know how to get the mail server name if my network is static? is it something like this, server_name.company_name.com? or could u explain more to me? or could u show me an example out of it? thanks for the help.. Thank you Rolf,I already send email How do I do to send sms? And possible to send sms with labview? Thank Hugo Fernandes hi, I came across with your SMTP email.vi, and i know that you already can send teh email. I would like to know whether u could help me with it? when i typed in the mail server's name, i get this kind of error: error code: 66 the network connection is closed by peer. do you know what it is mean by that statement? I would very appreciate it if you could show me an example of writing a correct mail server 's name. by the way, I am using microsoft outlook to send and receive email in a network. thanks for the hep! Quote Link to comment
Rolf Kalbermatter Posted June 12, 2006 Report Share Posted June 12, 2006 hi..I am a beginner in labview. I recently came across with the SMTP_email.vi example posted by eerc. I had tried it out, but I encountered a problem. Does the mail server meansthat the server used in microsoft office outlook ? let's say I am using the microsoft outlook to send or receive email, so may I know how to get the mail server name if my network is static? is it something like this, server_name.company_name.com? or could u explain more to me? or could u show me an example out of it? thanks for the help.. hi, I came across with your SMTP email.vi, and i know that you already can send teh email. I would like to know whether u could help me with it? when i typed in the mail server's name, i get this kind of error: error code: 66 the network connection is closed by peer. do you know what it is mean by that statement? I would very appreciate it if you could show me an example of writing a correct mail server 's name. by the way, I am using microsoft outlook to send and receive email in a network. thanks for the hep! Does your server need authentification (password) to connect too. That would be the most obvious reasons. The server initially accepts the connection but when seeing the client trying to send mails without first doing authentification it simply drops the connection. The SMTP VIs do not support authentification of any kind so it will not work for email servers requiring that. And since you do seem to get a connection initilially I'm pretty sure you got the server name already right. Rolf Kalbermatter Quote Link to comment
Mike C Posted November 28, 2006 Report Share Posted November 28, 2006 hello Mike C, Thank you for the explanation. Then it is possible send sms indirectly with Labview, through one SMS gateway. thank you, Mike C Eerc, I am not sure how one would use an SMS gateway to sent an sms to a cell phone. From what I have seen you would need to subscribe to some kind of service that allows you to do that. In searching for an answer to your question (I've been wondering myself how to do this), I have found that you may be able to send an sms to a phone by simply sending an email to the phone. In my case my mobile provider (US Cellular) allows an email to be sent to a phone. I can send an email to 'myphonenumber@email.uscc.net' and it will show up as a text message on my phone. Other providers may allow this or provide it as a service (maybe for free). Check with your mobile provider if you can do this. I hope this helps Michael Quote Link to comment
AnalogKid2DigitalMan Posted November 28, 2006 Report Share Posted November 28, 2006 Eerc, I am not sure how one would use an SMS gateway to sent an sms to a cell phone. From what I have seen you would need to subscribe to some kind of service that allows you to do that.In searching for an answer to your question (I've been wondering myself how to do this), I have found that you may be able to send an sms to a phone by simply sending an email to the phone. In my case my mobile provider (US Cellular) allows an email to be sent to a phone. I can send an email to 'myphonenumber@email.uscc.net' and it will show up as a text message on my phone. Other providers may allow this or provide it as a service (maybe for free). Check with your mobile provider if you can do this. I hope this helps Michael You can subscribe to a web service and probably do sms. Xmethods has a host of services, search SMS at this link: http://www.xmethods.net/ve2/Directory.po;j...JqUIB(QHyMHiRM) Here is a link for using services in 8.2 http://zone.ni.com/devzone/cda/tut/p/id/4728 And for 7.0 and 8.0 http://zone.ni.com/devzone/cda/tut/p/id/4729 I tried one of the services in 8.2 to dial my cell and read aloud a message that was text. All in about 10 minutes with never using web services- pretty cool. Hope this helps Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.