markariels
13 years ago
Hi guys,

Is there anyway we can capture error before the command, oSmtp.SendMail() = 0?

I'm trying to capture any error when logging in the Exchange server (oSmtp.Username and oSmtp.Password) error before doing anything.

Thanks!
ivan
  • ivan
  • 100% (Exalted)
  • Administration
13 years ago

Hi guys,

Is there anyway we can capture error before the command, oSmtp.SendMail() = 0?

I'm trying to capture any error when logging in the Exchange server (oSmtp.Username and oSmtp.Password) error before doing anything.

Thanks!

markariels wrote:



Hi, I am sorry to say you cannot.

Because before you call SendMail, there is no networking connection established.
But if there is any error, SendMail method will return immediately and you can use GetLastErrDescription method to get the detail.

EXPLORE TUTORIALS

© All Rights Reserved, AIFEI Software Limited & AdminSystem Software Limited.