Thread: HTML PHP Email Problem / Postfix Mail Server Configuration / Squirrelmail Setup
i'm having problems emails containing html content. when google downloads email messages via pop3 squirrelmail server, message not display using html. i'm not sure if google's fault or squirrelmail's fault, i've never had problems before on other servers running same script , using squirrelmail. if login squirrelmail, have option download email message attachment. attachment, if opened local browser, shows html content, , formatted. however, i'm using google download emails , file them under gmail account. after gmail downloads messages, shows this:
from
admin@domainremoved.com
date sat, jul 30, 2011 @ 6:07 pm
subject pending registration
content-type: text/html; charset=iso-8859-1
from: name removed <admin@domainremoved.com>
message-id: <20110730234302.6b6fedc08ba@eric-desktop>
date: sat, 30 jul 2011 17:43:02 -0600 (mdt)
<p><b>after registering client via server, please visit following url send them confirmation:</b></p>
ideas? need show once gmail downloads messages, takes long time login squirrel mail , download each message attachment.
php code headers this:
$headers = 'mime-version: 1.0' . "\r\n";
$headers .= 'content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= "from: $uname <$email>";
suggested remove \r\n script. did, , email shows sender www-data www-data@domain.com. before, field showed empty. however, php script designed change sender's information clients contact me. thus, if customer contacts me, email should customer <custa@whatever.com>. however, it's not being changed php script. ideas why? works on every other server mine. think postfix configuration isn't setup properly? needs configured on it?
appreciated.
short reply: try removing "\r" , use "\n". better?
if you're creating html messages php, should using mime. that's lot more complicated adding single content-type header, it's lot more reliable.
if have decent standards-compliant email client thunderbird available, try composing html message yourself, then. after receiving it, use view > source display complete message text. you'll see plain-text part , html part , "content-type: multipart/alternative" headers. that's way go if want create standards-compliant messages html content. can use message created thunderbird template messages generated script.
Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [ubuntu] HTML PHP Email Problem / Postfix Mail Server Configuration / Squirrelmail Setup
Ubuntu
Comments
Post a Comment