- Сообщения
- 3,556
- Репутация
- 628
Код:
Func _INetSmtpMailCom()
$objEmail = ObjCreate("CDO.Message")
With $objEmail
.From = "от кого"
.To = "кому"
.Subject = "ЗАГОЛОВОК ПИСЬМА"
.Textbody = "СОДЕРЖАНИЕ_ПИСЬМА"
.AddAttachment("")
EndWith
With $objEmail.Configuration.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.ххххх.хх"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "логин"
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "пароль "
.Update
EndWith
$objEmail.Send
EndFunc
Код:
The requested action with this object has failed.:
$objEmail.Send
$objEmail.Send^ ERROR
как учесть эту ошибку, чтобы не было завершение работы скрипта?