Sample code for 30+ languages & platforms
Xbase++

Send email using SSL (port 465).

Send email using SMTP SSL on port 465.

Chilkat Xbase++ Downloads

Xbase++
LOCAL nSuccess
LOCAL oMailman
LOCAL oEmail

nSuccess := 0

//  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 := CreateObject("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 := 1
oMailman:SmtpPort := 465

//  Create a new email object
oEmail := CreateObject("Chilkat.Email")

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

nSuccess := oMailman:SendEmail(oEmail)
IF (nSuccess != 1)
    ? oMailman:LastErrorText
    oMailman:destroy()
    oEmail:destroy()
    RETURN
ENDIF

nSuccess := oMailman:CloseSmtpConnection()
IF (nSuccess != 1)
    ? "Connection to SMTP server not closed cleanly."
ENDIF

? "Mail Sent!"

oMailman:destroy()
oEmail:destroy()