Error when don't sent email


jgv276

Recommended Posts

I need know when an email dont be sent, but I cant make it

Code:

try

Email.Send()

catch("C1007")

System.ErrorMessage("Could not connect to server")

endcatch

catch("C1008")

System.ErrorMessage("Could not send message! Response: 550 Access denied - Invalid HELO name")

endcatch

catch()

System.ErrorMessage("Could not send message! - Unknown error")

endcatch

I believe that is for delay at received the error code

Link to comment
Share on other sites

Email, like FTP is done asynchronously in DAQFactory. This means that when you do email.send(), it starts the process but does not wait for completion. For this reason, it will never throw an error. To catch the error you have to use the OnAlert sequence event. Just create a sequence with the name OnAlert and look at the strAlert value passed in. This sequence will get called with every alert. System events like OnAlert are described in section 5.28 of the user's guide (the end of the sequence chapter).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.