WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

SMTP Functions

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

SMTPSendText Hangs when Server Unavailable

Keywords:    SMTPSendText

Question:

I am writing a script that monitors NT services and sends an e-mail if their status changes. When I use the smtpText function, and a mail server can be reached, everything works fine. If the mail server is unavailable or the network is down, I want my program to do something else. With the network down, smtpText just hangs in its "pseudo-blocking" mode. Is there any "non-hanging" way to check the mailserver or other ip device for being up or down inside WinBatch?

Answer:

You could try a wxPing first. It would eventually timeout. Only if the failure occurred in between the wxPing and the smtpSendText would the script hang.
Article ID:   W12686
Filename:   SMTPSendText Hangs when Server Unavailable.txt
File Created: 1999:04:15:16:48:56
Last Updated: 1999:04:15:16:48:56