LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How Can I send an Email From CVI?

Hi Folks!!

Do you have any  idea of what can I do, becasue I have checked what you mentioned me an the address is the correct.....

 

Thanks!!!

0 Kudos
Message 11 of 27
(4,315 Views)
I really don't know if I can be of much help. Have you tried the telnet command that Mohan suggested earlier?

Also, is there some other smtp server that you can access for testing purposes that will determine if the problem is the server, or some other configuration in your machine? If not, I would suggest searching for some freeware smtp server that you can download, install and test yourself, to see what happens.

Luis

0 Kudos
Message 12 of 27
(4,307 Views)
I will continue looking for some ideas becasue until today this function is not working and I have the same System Socket error so let me try to do some other thing I will contact my server administrator 'cause I thnik that this problem is related to some permissions...
 
Anyway Thanks for your help...
0 Kudos
Message 13 of 27
(4,139 Views)
Hello Victor,

Could you please try sending email using your SMTP mail server manually and see if that works properly? To do that, open Windows command line prompt and execute the following commands:

telnet [your mail server] 25
/* return code should be 220 ..... */

HELO [your IP address]
/* return code should be 250 ..... */

MAIL FROM: [sender's email]
/* return code should be 250 ..... */

RCPT TO: [recipient's email]
/* return code should be 250 ..... */

DATA
/* return code should be 354 ..... */

[enter the email content (end the message with "." on a line by itself)]

QUIT
/* return code should be 221 ..... */

Please let me know about your findings.

Good luck and best regards,
Shakhina P.
Applications Engineer
National Instruments
0 Kudos
Message 14 of 27
(4,137 Views)

Thanks! for the advice. It worked perfectly. I could send the Email from the windows CMD with the instructions described by you.

But now this means that I have to open a telnet connection from Lab windows to be able to use the InetSendMail() function or what will be the steps to send the email from CVI?

Victor Salcedo

Regards!!

0 Kudos
Message 15 of 27
(4,118 Views)

Now that I know that it's working to send an Email Manually from the cmd.exe, Do you have an idea what from CVI is not working? Maybe I will need to generate another thing?

Thanks for your support!!!

Regards!!

0 Kudos
Message 16 of 27
(4,093 Views)
Hello Victor,

Could you try connecting to your SMTP mail server using TCP on port 25 and see if you can establish connection? You can use ConnectToTCPServer function for that. Or you can use the shipping example \CVI71\samples\tcp\client.cws and see if you get return code 220 in the "Recieve" box after you enter in the server name and port number.

Also, if you can use Outlook to send email, you might want to look into the outlook example at \CVI71\samples\activex\outlook\outlookrep2000.cws.

Good luck and best regards,
Shakhina P.
Applications Engineer
National Instruments

0 Kudos
Message 17 of 27
(4,087 Views)
Hi! Shahina:
I could not establish connection from the ConnectToTCPServer function I got  "Connection to server failed".
But then I use Outlook to send email as you told me and it worked good.  I will try to generate the Email from this Sample, but I will try to continue look for the error from the other functions becasue I don't those are failing.
 
Thanks for your Help!!!
0 Kudos
Message 18 of 27
(4,074 Views)

Hi!

As you know I have tried to use the Function InetSentMail() without success I don't know why this is failing, I have sent the Email from the CMD using the steps described by Shahina and I used the Outlook Sample to send the Email from CVI and it worked, But I can not have Outlook Installed on the all the Test Computers that we have, I would like to find out how to use the Function InetSentMail().

Is there something else to do in order to be able to have this function working properly?

Thanks for your support.......

0 Kudos
Message 19 of 27
(4,005 Views)
Hi Victor,

We have recently learned that VirusScan version 8 might be blocking CVI from port 25 and thus InetSendMail function is failing (this works fine with VirusScan version 7.1). So if you are indeed using VirusScan 8, could you try uninstalling it and see if you can send email using the InetSendMail function?

Thank you and best regards,
Shakhina P.
Applications Engineer
National Instruments
0 Kudos
Message 20 of 27
(3,867 Views)