Welcome to WebmasterWorld Guest from 3.209.80.87

Forum Moderators: phranque

Message Too Old, No Replies

Unwanted mail headers & encoding (qmail related?)

Messages get encoded and headers inserted in email sent via PHP

     
2:19 am on Mar 17, 2007 (gmt 0)

New User

10+ Year Member

joined:July 8, 2006
posts:9
votes: 0


Hi everyone,

I suspect the answer to this puzzle is a default setting outside PHP - possibly in qmail.

I need to send emails in Chinese GB2312 encoding so they can be read in Hotmail via a web browser.

I can manage this on my development server (a shared server managed by a hosting firm).

However, when I send mail from the production server (different hosting) all messages get encoded and the following headers are inserted at the end of any headers I specify:

Content-Type: text/plain; charset=UTF-8
Mime-Version: 1.0
Content-Transfer-Encoding: BASE64

The message ID is of the form: Message-ID: <20070317014242.#*$!XX.qmail@domain.dnsXX.com> so I'm guessing that qmail has a role in the header insertion. The development server doesn't use qmail.

Any suggestions to stop the encoding and header insertion will be greatly appreciated!

FWIW I tried to get around this problem using the SMTP option in the LGPL PHP phpmailer class but it seems that Hotmail eagerly rejects SMTP mail :-(

2:37 am on Mar 17, 2007 (gmt 0)

Administrator from JP 

WebmasterWorld Administrator bill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Oct 12, 2000
posts:15177
votes: 177


If it was just a Hotmail issue you could look into implementing Sender ID [microsoft.com] on the domain. It's a variant of SPF [openspf.org].

I'm not familiar with qmail so I can't help you there. I send my Chinese mail through a CGI that uses a sendmail variant on my host. That doesn't seem to have a problem injecting headers.

11:25 pm on Mar 17, 2007 (gmt 0)

New User

10+ Year Member

joined:July 8, 2006
posts:9
votes: 0


Hi Bill

Thanks for your reply.

I should clarify. Happily, sending via SMTP does not inject headers - I get nice clean messages.

The problem with SMTP is simply that Hotmail rejects emails sent this way. I'll try implementing Sender ID to resolve this.

Could be a nice fix - certainly easier than modding qmail I hope! Thanks again :)