Finding the problem (debugging tips)

hi there

I’m trying to send some emails to the registered users from mysql db using the mail() function.

When the body of the message is text, all works fine, the message is sent. When the body is Html, the email isn’t delivered.

Does anyone has an advice about how can I find the problem?

ps: I’m using godaddy as php server host.

I had an issue recently where messages weren’t being sent when there was a linefeed (
) in the message. The fix was to replace each
with \r
. Might be worth a try.

One further thought, have you checked the messages haven’t been blocked by your spam filter? I’ve got a feeling HTML emails are more likely to be.

Are you passing in the correct headers when sending the HTML email?

You might want to make a wrapper class for the mail function, here’s a small i wrote that maybe you can use

http://poundpipe.com/v/baaao/simple-email-class

That feeling is half right. Spam filters seriously dislike HTML only e-mails. They dislike multipart e-mails with HTML and plaintext a bit less :slight_smile: