LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

send email using SMTP?

Hi,
         I am trying to send e-mail using SMTP Send Message(Small).vi which will be in the SMTP email.llb file. By using this vi I am able to send e-mail to those id 's   for which I know SMTP mail server name. But I am not able to send e-mails to those e-mail id's for which SMTP mail server name I don't have(like yahoo,gmail).
         Can we use SMTP to send the e-mail to those id's for which we don't have SMTP mail server name ?
 
   Please give me any suggesation on how to do this? 
    
  
Thanks:-
Mike 
0 Kudos
Message 1 of 16
(4,326 Views)
Hi Mike,
I don't really understand your question. You just need 1 smtp server, this can be used to send email to any email address.

If you're not sure about the smtp server of your email provider, check the provider's help pages as this is required information if you want to set up a mail program. Look for instructions how to set up Outlook / Thunderbird or other mail programs, you'll find their smtp server address there. For gmail it is: smtp.gmail.com

One problem here is that most providers require authentication. The smtp VIs don't support this.

Daniel

Message 2 of 16
(4,314 Views)

Hi Daniel,

 Thanks for your quick suggestion. My problem is, I know the SMTP mail server name of my company, so I am able to send the mails to anyone in my company. But I am not knowing the  name of SMPT mail server of third party(like gmail,yahoo) so I am not able to send mails to any of this mail id's.

     My customer is giving me the mail id's for which he want to receive the mails but he may or may not give me the SMPT mail server names of those mail id's.  So I require to give mail id's as a input to my program and it should send mails to those e-mail id's irrespective of their SMTP server names. This will also increase the portability of my application as only e-mail id's are needed to give as a input. Can this be possible using SMTP? Or if u know any other way to do this?

 What about authentication? How to over come of that problem...

 

Thanks:-

Mike

 

  

0 Kudos
Message 3 of 16
(4,310 Views)
Hi Mike

You don't need any smtp information about the recipients. You should be able to send emails to ANY recipient using your company's SMTP server. Do you get an error when trying to send emails to recipients outside your company?
I once created a copy of "SMTP Email Send Multiple Attachments.vi" that supports authentication but it was based on an old version of this VI (LV 7.1 with Internet toolkit).

Daniel

Message 4 of 16
(4,303 Views)

Hi Daniel,

   I am using SMTP mail server of my company. And I am not able to send e-mail to my personal e-mail id's which is on yahoo,gmail. When I try to do this the following error message comes:-  " Requested action not taken: mailbox unavailable, For Example mailbox was not found or there was no access".

  Is the error occours due to authentication or their might be another reason for it?

 

Thanks:-

Mike 

0 Kudos
Message 5 of 16
(4,302 Views)
Hi Mike

No, this doesn't look like an authentication problem. It looks to me as the SMTP server you're using is just for internal emails. Can you check the SMTP server setting in your email program (e.g. Outlook)? Can you send emails to external recipients (gmail, yahoo, ...) using your email program? If you can, it should also work with the SMTP VIs using the same SMTP server.

Daniel

0 Kudos
Message 6 of 16
(4,289 Views)

Hi Daniel,

   Yes, I am can send mails to the other mail id's (yahoo,gmail) using outlook. One interesting thing is that this vi is not checking for the sender's autentication(e.g:- even i put sender as XYZ and send to other e-mail id's of my company those id's are receiving that mails). In other words this vi is not at all using my company mail id to send mail.

  I think I am using some wrong vi's or program for doing this. Do u have any sample application for doing this? I can try that application and let's see if it solve my problem.

Thanks:-

Mike

0 Kudos
Message 7 of 16
(4,286 Views)
One additional point is that the SMTP VIs are a rather minimalist implementation of the standard and as such will probably not work in the modern age of spam filters. You'll get most likely get back a lot of messages from email servers mumbling about "malformed messages". For this reason I recommend that you use external code to send the email. For example there are a couple different ActiveX components on the market that work well, are easy to use, are cheap and don't generate "malformed messages".

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 8 of 16
(4,280 Views)

Hi Mike,

  Thanks for the advice. Can u elaborate more on what u mean by external code? Is this code are easily integrable with lab view? Please give me some web link about this external code if you have any. I will have a look at this external code and their price. But my first priority will be to built this vi using lab view SMTP vi, I can go for any external code if I am not sucessed in doing it.

   Can the SMTP vi work fine with SMTP mail server which will having no spam filter?

 

Thanks:-

Mike

0 Kudos
Message 9 of 16
(4,275 Views)
Hi Mike

If you have access to a smtp server you can specify whatever sender email address you want. This opens the doors for spam. That's the reason why most email providers require authentication for smtp.

Did you check the smtp settings in your email application? It's the same SMTP server you're trying to use from LabVIEW? And what about authentication, do you have that enabled in your email application?

I don't have any test program to send emails from LabVIEW, the SMTP VIs are ready to be used for testing. Probably you can try using the "SMTP Email Send Multiple Attachments.vi" instead of the simple VI. Just leave the attachments array empty if you don't need to send any.

Using an activeX control might work as well, but of course you'll still need the SMTP server.

Daniel

0 Kudos
Message 10 of 16
(4,263 Views)