tcp.sendMail

Syntax tcp.sendMail (recipient, subject, message, sender, cc, bcc, host, mimeType, adrHdrTable, timeOutTicks, flMessages)

Params recipient is a string, the email address of the person who is to receive the message.

subject is a string, it's the subject of the message.

message is a string, the body of the message.

sender is a string, the email address of the sender. It defaults to user.prefs.mailAddress.

cc is a string, it's a comma-separated list of people who will receive a "carbon copy" of the message.

bcc is a string, it's a comma-separated list of people who will receive a blind carbon copy of the message.

host is a string, identifying the mail server that will handle this message. It defaults to user.prefs.mailHost.

mimeType is a string, saying what the MIME type of the message is. Its default value is "text/plain".

adrHdrTable is the address of a table of items to be added to the message header, possibly overriding standard header items. The default value is nil.

timeOutTicks is a number, specifying after how many ticks the script will time out when waiting for a response from the server. If a timeout occurs, the connection is closed and an error message is generated. The default value is 3600 ticks (60 seconds).

flMessages, a boolean, if true, tcp.sendMail will display progress messages in the About window.

Action Sends a mail message.

Returns True.

Errors If there's an error sending the mail message, tcp.sendMail throws a script error which you can catch with a try statement.

Examples tcp.sendMail ("dave@userland.com", "Hello!", "Let's have fun!")
true

Notes All of its parameters are optional, a common usage is to only specify some of the parameters and label all parameters with their names.

This verb is implemented as a script.

See Also tcp.getMail

string.cleanMailAddress

string.htmlToEmail

Discuss