So the correct usage for a multi-part mail if i want to send a html
mail, but want a text part as a backup would be:

<cfmail to="[EMAIL PROTECTED]" from="[EMAIL PROTECTED]" subject="subject
line" type="text">
<cfmailpart type="text/html">#htmlContent#</cfmailpart>
#textContent#
</cfmail>

Is this right ?




Sean Corfield wrote:
On 7/5/05, Steve Onnis <[EMAIL PROTECTED]> wrote:

<cfmail to="[EMAIL PROTECTED]"
               from="[EMAIL PROTECTED]"
               subject="subject line"
               <cfmailpart type="text/plain">this is a message</cfmailpart>
</cfmail>


I assume there should be a '>' after the subject= attribute.

This has two parts: the explicit <cfmailpart> and the implicit body of
the <cfmail> tag. If you have only one <cfmailpart> tag, the body of
<cfmail> is used to create a default text mail. If you have multiple
<cfmailpart> tags and one of them is text, the last text <cfmailpart>
will be used for the default text mail.

<cfmail to="[EMAIL PROTECTED]"
               from="[EMAIL PROTECTED]"
               subject="subject line">
               <cfmailpart type="text">this is the first message</cfmailpart>
               <cfmailpart type="text">this is the second message</cfmailpart>
</cfmail>

There will be two parts to this email, the second part will be shown by default.


By default the CFMAIL type attribute is HTML.


Not according to the docs:

type   Optional   text/plain   MIME type of the message. Can be a
valid MIME media type or one of the following:...

The default type attribute is text.


If only 1 mime type is set in
the email like above, it will add another mime area in the email for what
ever the type attribute is set to.


<cfmailpart> => first mime area
<cfmail> body => second mime area (as text by default)


So even if i was to change the type attribute to HTML and i send a text only
email using CFMAILPART, it will add its own html section to the bottom of
the email.


I don't understand what you are saying here. Both <cfmail> and
<cfmailpart> have a type= attribute...

---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to