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.
Get ASP in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.