emailsendcdo Function

Syntax

L EmailSendCDO(C SmtpServer ,N SmtpPort ,C SmtpUsername ,C SmtpPassword ,L SmtpAuthenticate ,L SmtpUseSsl ,C To ,C From ,C Subject ,C HtmlBody ,C TxtBody [,C Cc [,C Bcc [,C Attachments [, sender as c]]]])

Arguments

SmtpServerCharacter

The SMTP server address.

SmtpPortNumeric

The SMTP port to use.

SmtpUsernameCharacter

The SMTP user name.

SmtpPasswordCharacter

THe SMTP password for the user name.

SmtpAuthenticateLogical

If .T., authenticate the SMTP connection. Otherwise .F.

SmtpUseSslLogical

If .T., use SSL. Otherwise .F.

ToCharacter

A comma delimited list of email addresses.

FromCharacter

The email address of the sender.

SubjectCharacter

Email subject.

HtmlBodyCharacter

HTML message to send.

TxtBodyCharacter

Plain text message to send.

CcCharacter

A comma delimited list of email addresses.

BccCharacter

A comma delimited list of email addresses.

AttachmentsCharacter

A comma delimited list of attachments.

senderCharacter

An optional sender address.

Returns

ResultLogical

Returns .T. if operations succeeds. Otherwise .F.

Description

Use the Microsoft CDO ActiveX object to send e-mail rather than the Alpha Anywhere's' built-in socket object.

Escaping Commas in Attachments 

If the file name(s) contain a comma, you can escape the comma using {comma}. For example:

file1{comma}description.txt,file1.txt

See Also