Код:
_send("тело письма", "тема письма", "полный путь к файлу")
Func _send($Body, $Subject, $Attachment)
$FromAddress = 'откуда'
$ToAddress = 'куда'
$SMTPServer = 'smtp.mail.ru'
$Username = 'откуда'
$Password = "пароль от откуда"
$Port = '2525'
$str = "http://schemas.microsoft.com/cdo/configuration/"
$hMAIL = ObjCreate ("CDO.Message")
With $hMAIL
.From = $FromAddress
.To = $ToAddress
.Subject = $Subject
.TextBody = $Body
.AddAttachment ($Attachment)
EndWith
With $hMAIL.Configuration.Fields
.Item ($str & "sendusing") = 2
.Item ($str & "smtpserver") = $SMTPServer
.Item ($str & "smtpauthenticate") = 1
.Item ($str & "sendusername") = $Username
.Item ($str & "sendpassword") = $Password
.Item ($str & "smtpserverport") = $Port
.Update
EndWith
$hMAIL.Send
EndFunc
Почему не отправляет на почту ???