Hi Alex

I think the postcard module is excellent..thanks for coming up with it and submitting it. It's a great module.

Quick question.

How do I change the headers in the mailer to be a HTML enhanced email rather than just text?

I assume it is something to do with the headers set in the postcard.module...i.e.
I tried inserting the following lines in the function postcard_send section...but it wouldn't work..

$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";

Is there something else I need to remove/edit or change?

Cheers

Jason

Comments

axel’s picture

My personal opinion - html-mail is bad thing, plain text is traditional and only one mail format. Html mail commonly love spammers and me for example simply set filter for home mail - all html-mail goes directly to /dev/null.

Though, if you want to send html letters replace format in user_mail() definition in user.module. This function contains the string:

MIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8; format=flowed\nContent-transfer-encoding: 8Bit\n"

I think replacing must be in this place.

Dublin Drupaller’s picture

i agree Alex..point taken...re: Html email...I too tend to be wary of enhanced emails because spammers use them so much to get noticed...

At the same time I subscribe to a few newsletters on other sites that would be impossible to scan and decipher quickly in text only format.

What I'm looking at trying to do is try and tweak the postcard module to really send a postcard to a person...so when the person gets the email...there is a text message "if you can't see your postcard from [username] click on the link below"...

My logic is based on the fact that people would tend to send people they already know a postcard...so it would be assumed that the recipients email smap blocker would accept emails from their pal. I know that spammers sometimes disguise from headers...but...most decent spam blockers would spot that.

I maybe wrong and it maybe not worth the effort..but am going to try anyway...will let you know how I get on.

It's a brilliant module by the way..

Jason..