Skip to main content
Inspiring
June 19, 2007
Question

CFMAIL formatting question

  • June 19, 2007
  • 4 replies
  • 596 views
I'm sending out a email using CFMAIL, but have noticed that the formatting
gets all screwed up in places like Hotmail.

What is the best type of formatting options to pick? I have the options set
as shown below:

<cfmail from="info@site.com"
to="#form.Email#"
bcc="wingnutg144@site.com"
subject="Requested fencing information"
server="mail.site.com"
port="25"
charset="iso-8859-1"
type="html"
mimeattach="c:\emailDocs\#SendFileName#.zip"
mailerid="Site"
failto="info@site.com"
replyto="info@site.com">

And the the actual mail is being sent as:

Dear #user1#,<br>
<p>Thanks for requesting fencing information.</p>
<p>Your requested information has been attached to this email in the
form of a ZIP file. You will need a program such as PKZIP or WinZIP to
decompress the attachment. The programs listed above can be obtained from
<a href=" http://www.pkware.com">PKware</a>
or from <a href=" http://www.winzip.com">WinZip</a>, if not already
installed on your computer.</p>
<p>You have requested the following documents:<br>
<cfloop list="#form.Events#" index="i">
<cfset file1=findnocase("/",#i#,4)>
<cfset dl_file=right(#i#, file1+2)>
<strong>#dl_file#</strong><br>
</cfloop></p>

<p>We hope this information answers your questions, and we hope to see
you at a fencing class soon.</p>


Is there a better way? The message is getting all jammed together, no
spacing for paragraphs, etc......

Thanks!


    This topic has been closed for replies.

    4 replies

    June 20, 2007
    This is most likely to be a styling issue with the Hotmail service rather than CF itself. This is especially true as the service is web based and in the browser - meaning that your tags are possibly inheriting styles from the Hotmail style sheet.

    I've sent numerous Newsletters in the past and sometimes there's just not alot you can do about it. Sometimes using tables and old style HTML 4 is the best way to go with regard to email (nasty font tags etc)
    June 20, 2007
    Big pain, to be sure.
    Inspiring
    June 19, 2007
    What a pain that is!! :)

    "jdeline" <jdeline@deline.com> wrote in message
    news:f59jt7$pbu$1@forums.macromedia.com...
    > I've noticed the same thing at some (not all) Web mail sites. On one
    > application, I had to resort to sending text, not TYPE="html" That
    > required a
    > string to be constructed as the body of the e-mail:
    > <CFSET myBody = "Dear " & user & "#Chr(10)##Chr(10)#" & "Thanks for
    > requesting
    > fencing information." &Chr(10)##Chr(10)#" ... >
    > Your e-mail then looks like this:
    > <CFMAIL ... >
    > #myBody#
    > </CFMAIL>
    >


    June 19, 2007
    I've noticed the same thing at some (not all) Web mail sites. On one application, I had to resort to sending text, not TYPE="html" That required a string to be constructed as the body of the e-mail:

    <CFSET myBody = "Dear " & user & "#Chr(10)##Chr(10)#" & "Thanks for requesting fencing information." & #Chr(10)##Chr(10)#" ... >

    Your e-mail then looks like this:
    <CFMAIL ... >
    #myBody#
    </CFMAIL>