<< Click to Display Table of Contents >> Navigation: ThinBASIC Modules > SMTP > SMTP_SendHtml |
Description
Send send HTML encoded email once a connection has been made to your SMTP server after calling SMTP_Connect.
Syntax
ErrorCode = SMTP_SendHTML( To, Cc, BCc, Subject, Message, Images, AltText, Attach, Options )
Returns
Number.
If ErrorCode < 0 (Zero) means failure. Use SMTP_GetError to return error description of error code.
Parameters
Name |
Type |
Optional |
Meaning |
To |
String |
No |
Recipient, separated by semi-colons |
Cc |
String |
No |
CC list, separated by semi-colons |
BCc |
String |
No |
BCC list, separated by semi-colons |
Subject |
String |
No |
Subject text (max 256 chars) |
Message |
String |
No |
Mail message content or message filename from which to load message content. If the first character of the message is a '@', then it is considered as the filename which contains the message to send. Example: "@C:\Temp\Message.html" |
Images |
String |
No |
Contains the filenames of images that are to be embedded in the email message. The first image must be referenced in the text of the HTML encode email message as <IMG SRC="cid:message-root.1"> The second image (if any) must be referenced as <IMG SRC="cid:message-root.2"> continuing in this way for all embedded images. |
AltText |
String |
No |
Used to provide a plain ASCII text equivalent of the message for those email clients that cannot decode HTML |
Attach |
String |
No |
File attachment list. It may contain one or more attachments, separated by semi-colons, with no embedded spaces. |
Options |
Numeric |
No |
Not used but mandatory |
Remarks
Note that all email addresses (in To, CC, and BCC strings) must be bracketed, and the CC and BCC strings may contain multiple email addresses, separated by semi-colons. .
Restrictions
Message maximum size is 1 Mega Byte. If more room is needed, consider using external file message option.
See also
Examples