Forum Moderators: phranque
We would like to make the survey in .html and use form elements. Have made several - but when I put the html code onto the text file (template) being sent, the results are, the receiver gets an e-mail full of code rather that a nice html coded e-mail. When I send the same email from one of my accounts in outlook to another it works just fine.
Does anybody have any idea how I can get the .html to work properly when being sent as a text template from a script?
So I dug a few up. I suspect the headers may have some influence in this area and included what may control how it's displayed. I'm not very sharp in this area, Brett is. Email headers I found that always displays HTML:
MIME-Version: 1.0
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I found several examples all using these same header values, one included a form with drop downs et al similar to what you desribed.
Gotta go wash my hands... :)
Errors: errors@mydoman.com
To: [e_email]
bcc: me@myisp.net
From: me@myisp.com
Subject: [name], about your service at Findlay...
MIME-Version: 1.0
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="filename.html"
Content-Base: [mydomain.com...]
This header make the html work, but brings it in as an attachement. The form works but does not roll over to the second page as it doe if I do this purely in outlook express
Is there anything I should put in the header to make this function as a pure html page???
I have a CF custom tag that collects input from a form and formats an email both in plain text and HTML (with all form fields and user input in small Arial - great for big forms. It also means you don't have to mess around with naming each field as the script loops through all input fields and gathers them for output.
Anyway multi-part emails look like this:
From: server@domain.com
To: user@home.com
Subject: CFMAIL test
Reply-To: server@domain.com
Date: 05 Jan 2001 20:27:42 -0500
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_Kw33Bs99~WRRhysyY"
Message-Id: <200101051749356.SM02656@ddfllml01.domain.com>
X-RCPT-TO: <user@home.com>
X-UIDL: 269925326
Status: U
------=_Kw33Bs99~WRRhysyY
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
Text message here.
------=_Kw33Bs99~WRRhysyY
Content-Type: text/html
<HTML>
<HEAD>
<TITLE>CFMAIL Test</TITLE>
</HEAD>
<BODY>
<h1>HTML message here</h2>
</BODY>
------=_Kw33Bs99~WRRhysyY--
Could someone send me a sample html page with setup to send HTML and fall back to plain text.
b@iparq.com
Thanks
I'm trying to get CFMAIL to send a multipart plaintext & html email message.
any help here would be great!!