Name
MailFormat —
objNewMail
.
MailFormat =
intFormatSetting
Synopsis
An integer value that allows you to set whether the current message body is MIME encoded or simple text.
Parameters
-
intFormatSetting An integer value that can contain either of the following constants:
-
CdoMailFormatMIME (0) The contents of the current message will be in the MIME format.
-
CdoMailFormatText (1) The contents of the current message will be plain text. This is the default.
-
Example
This example demonstrates the use of the MailFormat property of the NewMail object.
<%
' Dimension local variables.
Dim objNewMail
Dim strRecipList
' Instantiate a NewMail object.
Set objNewMail = Server.CreateObject("CDONTS.NewMail")
' Set the MailFormat property to plain text (although
' this isn't strictly necessary since it's the default).
objNewMail.MailFormat = cdoMailFormatText
' Set the body string for the message.
objNewMail.Body = _
"Wow, this message takes just a few lines of code."
' Send the message. For details about the Send method,
' that section in this chapter.
objNewMail.Send "me@here.com","you@there.com", _
"This is the subject",,cdoHigh
%>Notes
The value of the MailFormat property becomes the default setting for
the EncodingMethod parameter of the
NewMail object's AttachURL and AttachFile methods.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access