LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Has anyone had success with InetSendMail()?

Hello everyone,  The foroums has several unanswered posts about this topic and I was wondering if anyone has had any success using it?  I am trying to get the example to work, but am receiving a error code -4 System Socket Error.  I don't know if this is because my mail server is not using port 25. Does InetSenrMail require a server on port 25?  I have tried using the Telnet tests and can't even find a server using port 25. Anyone's help who has experience with this would help.  Thanks.

0 Kudos
Message 1 of 2
(3,884 Views)

Sending mail from any application or test script is unfortunately never straight forward as one might imagine. The majority of times your mail gets blocked by local PC or or IT imposed network constraints.

 

So your first point of failure is antivius products blocking your PC from sending the message.

Your second point of failure is the IT policies not allowing you access to the port you try to open.

The third is the mail server blocking you access.

 

the easiest way to resolve your issues using the tools and opening the required ports and permissions is from a telnet session. On windows 7 and later Telnet is disabled by default and needs to be enable first. (https://kb.ctera.com/article/how-to-open-a-telnet-session-on-windows-7-or-windows-8-os-16.html)

 

After you enabled telnet open a telnet session and connect to the mail server you want to send mail messages through and issue commands and observer responses and errer messages. This will get you to the bottom of the failure and ports and services opened and enabled to allow you to send mail.

 

See this article on using telnet to send mail from the commandline: https://technet.microsoft.com/en-us/library/aa995718(v=exchg.65).aspx

 

Best regards

Jattie van der Linde
Engineering Manager, Software & Automation
TEL Magnetic Solutions Ltd
Message 2 of 2
(3,837 Views)