#AutoIt3Wrapper_Run_AU3Check=n
#include "sendmail.au3"
Global $rc = ""
Local $SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl
$SmtpServer = "smtp.yandex.ru" ; address for the smtp-server to use - REQUIRED
$FromName = "alex33" ; name from who the email was sent
$FromAddress = "[email protected]" ; address from where the mail should come
$ToAddress = "[email protected]" ; destination address of the email - REQUIRED
$Subject = "Тема письма отправленного из AutoIt скрипта" ; subject from the email - can be anything you want it to be
$Body = "Это текст письма, отправленного через AutoIt скрипт функцией _INetSmtpMailCom отредактированной Alex33... Всё работает" ; the messagebody from the mail - can be left blank but then you get a blank mail
#cs
не обязательно / можно не указывать
$AttachFiles = "C:\path\files\test.txt" ; the file you want to attach- leave blank if not needed
$CcAddress = "" ; address for cc - leave blank if not needed
$BccAddress = "" ; address for bcc - leave blank if not needed
$Importance = "Normal" ; Send message priority: "High", "Normal", "Low"
#ce
$Username = "yourlogin" ; username for the account used from where the mail gets sent - REQUIRED
$Password = "**********" ; password for the account used from where the mail gets sent - REQUIRED
$IPPort = 465 ; port used for sending the mail
$ssl = 1 ; enables/disables secure socket layer sending - put to 1 if using httpS
$rc = _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl)
If @error Then
MsgBox(0, "Error", "Error sending message" & @TAB & "Error code: " & @error & " Description: " & $rc)
EndIf