05-22-2009 02:17 PM
Hi, i made a copy of the SMTP Email Send message fonction to be able to use it with a diffrent smtp port (like 587). Everything is working fine when the recipient adresse is like myname@hotmail.com or any normal adress. The problem is when i'm trying to use this fonction to send an email to an adress like myname@mail.compagny.com. Every email adress of the compagny are like the second exemple. Does someone have an idea to solve this probleme?
Solved! Go to Solution.
05-22-2009 04:07 PM - edited 05-22-2009 04:13 PM
I had the same problem using my @msu.edu email server.
The problem is a lot of companies use TLS or SSL security settings.
There are ways to get around this.
I attached a VI that should work for you.
I cannot take credit for the VI, it was given to me by someone on the forums.
I just modified it a little bit.
Edit: If you look at the block diagram, towards the top, there is an invoke node.
It is for 'SMTP Client', and the element is 'host'.
You will need to change that from 'mail.msu.edu' to whatever server your company uses.
And you may need to change the port as well.
I also customized the VI's icon, but you can leave that if you like it
05-25-2009 08:02 AM
i forgot to specify that i'm using a external smtp serveur like smtp.gmail.com on port 465 or smtp.polymtl.ca port 587. Those two smtp server doesn't any authentification.
Thanks for the answer, i trying the code you posted and it doesn't work for me.
I tried another code i found here on the forum that use the outlook application to send the email but it need Outlook to be open when the vi is called. This is not really what i need. Anyone have an idéa to use directly microsoft Exchange server or send a email via an external smtp server?
05-25-2009 08:24 AM
Hi,
i had also the same problem. To solve it I'm using the .NET Mail components and not the SMTP-Library because the standard labview SMTP-library doesn't provide a authentication.
I've attached a screenshot of my mail example.
HTH
--
Joachim
05-25-2009 09:41 AM
Thanks for the quit answer. I can't find the .net Mail components
05-25-2009 09:59 AM
05-25-2009 11:53 PM
mchevrier,
which version of the .NET component do you use? I am using labview 8.6.1 with .net 2.0. I've attached a screenshot with the constructor selection.
hth
--
joachim
05-26-2009 06:03 AM - edited 05-26-2009 06:09 AM
I'm using exactly the same version of labview et .net. The code on the screenshot you posted is the same as Cory K posted before Email_SSL.vi and it doesn't work here. :S
I think that the problème is not the authentification because the server that i use does not need one, but the email adress itself cause the problem. Anytime i put a dot in the adress like firstname.famillyname@myemail.com or username@sub.domain.com it doesn't work. When i send the email to a regular adress like myname@hotmail.com. It works well. i just don't understand.
I tried to connect directrly on my smtp server via telnet and send the command manually and it doesn't work when i put a adresse like username@sub.domain.com.
05-26-2009 10:04 AM
Thanks Cory K and Joachim082. My problem is solve, i used the code that Cory posted here with our internal microsoft Exchange server but i put False to EnableSSL because it doesn't support SSL authentification.
Thanks for the help.