<- Back to SMTPit Pro function list
SMTPit_SetBody
- Description
Use the SMTPit_SetBody function to set the Plain Text or HTML Body of the email. The "Body" of the email is the content of the email that the receiver will read.
- Return Type
- Text
- Format
- SMTPit_SetBody ( Content ; Type ; SMTPit_Append )
- Required Parameters
- Content
The Plain Text or HTML content for the email.
- Content
- Optional Parameters
- Type
The Content Type; specify "Text" or "HTML". (Default is "Text".)
- SMTPit_Append
Leave this in to add this Text to the end of the current Text content.
- Type
- Related Items
- SMTPit_SetBodyFooter, SMTPit_SetBodyHeader, SMTPit_SetBodyWithFile, SMTPit_StyledTextToHTML
- Examples
Example 1
Code:
SMTPit_SetBody( MyEmailBodyField )Result:
Uses the text in the "MyEmailBodyField" field for the text body of your email message.Example 2
Code:
SMTPit_SetBody("Hello World!")Result:
Uses the text "Hello World!" for the text body of your email message.Example 3
Code:
SMTPit_SetBody("Hello World!";"Text"; SMTPit_Append )Result:
Appends "Hello World!" to the current text body block.Example 4
Code:
SMTPit_SetBody( MyHTMLEmailBodyField ;"HTML")Result:
Sets the HTML body to the html in the "MyHTMLEmailBodyField"Example 5
Code:
SMTPit_SetBody("<h1>Hello World!</h1>";"HTML"; SMTPit_Append )Result:
Appends the html "<h1>Hello World!</h1>" to the current HTML body.