Sample code for 30+ languages & platforms
AutoIt

Send email using SSL (port 465).

Send email using SMTP SSL on port 465.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

; This example requires the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.

; The mailman object is used for sending and receiving email.
$oMailman = ObjCreate("Chilkat.MailMan")

; Set the SMTP server.
$oMailman.SmtpHost = "smtp.att.yahoo.com"

; Set SMTP login and password (if necessary)
$oMailman.SmtpUsername = "myUsername@sbcglobal.net"
$oMailman.SmtpPassword = "myPassword"

$oMailman.SmtpSsl = True
$oMailman.SmtpPort = 465

; Create a new email object
$oEmail = ObjCreate("Chilkat.Email")

$oEmail.Subject = "This is a test"
$oEmail.Body = "This is a test"
$oEmail.From = "Chilkat Support <support@chilkatsoft.com>"
$bSuccess = $oEmail.AddTo("Chilkat Admin","admin@chilkatsoft.com")

$bSuccess = $oMailman.SendEmail($oEmail)
If ($bSuccess <> True) Then
    ConsoleWrite($oMailman.LastErrorText & @CRLF)
    Exit
EndIf

$bSuccess = $oMailman.CloseSmtpConnection()
If ($bSuccess <> True) Then
    ConsoleWrite("Connection to SMTP server not closed cleanly." & @CRLF)
EndIf

ConsoleWrite("Mail Sent!" & @CRLF)