tags:

views:

104

answers:

1

I just switched from a shared server to a virtual dedicated. The whole site works, but my mail forms have quit sending MIME emails the way they used to.

What used to appear before the server switch:

hallo fwend

What appears now in the emails (appears as though my client doesn't support MIME):

Content-Type: multipart/alternative; boundary="==DL- bound_b08bcfabdc459ae7e87e493a984115b3"

This is a multipart MIME message from your friends at Example.com. If you are reading this, it seems we have a message to deliver, but your mail client is not set to receive these types of messages. We are sorry for the inconvenience :(

--==DL-bound_b08bcfabdc459ae7e87e493a984115b3

Content-Type: text/plain; charset=iso-8859-1

Content-Transfer-Encoding: 7bit

hallo fwend

Is there some switch in PHP or something that I need turned on to send MIME?

+1  A: 

It look like the headers are send in the body part of the message. I had this problem a while back.

Possible causes are:

1. EOL
I used "\r\n" as eol for the MIME headers (following the spec) , but the (shared)server wanted an "\n"

2. Last header
Some mail server add some headers of their own. If the last header end with "\n" and the mail server could also mess thing up.

3. Empty header
An empty header which causes a "\n\n" in the $headers will corrupt the headers. The "\n\n" aka "empty line" marks the end of the headers part of a email (or the start of the body)

Bob Fanger