Версия AutoIt: 3.
Описание: Помогите пожалуйста перевести этот код на PHP:
Описание: Помогите пожалуйста перевести этот код на PHP:
Код:
Func _MailSend($Mail_From = "", $Subject = "", $Body = "")
Local $objEmail = ObjCreate("CDO.Message")
$objEmail.From = $From & " <" & $MyEMail & ">"
$objEmail.To = $ToEMail
$objEmail.Subject = $Subject
$objEmail.Textbody = $Body & @CRLF
$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $MySmtpServer
$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $MySmtpPort
$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = $MyEmail
$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $MyPasswd
$objEmail.Configuration.Fields.Update
$objEmail.Fields.Item("urn:schemas:mailheader:Importance") = "Normal"
$objEmail.Send
$objEmail = ""
EndFunc ;==>_MailSend