Struggling With PHP Mail Header and GoDaddy Security

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
zunebuggy
Forum Commoner
Posts: 41
Joined: Wed Aug 27, 2008 1:22 pm

Struggling With PHP Mail Header and GoDaddy Security

Post by zunebuggy »

I have created a form that is hosted on GoDaddy. The form posts to a mailsend.php file that contains the line

mail($recipient, $subject, $mail_body, $header);

where $header contained "From: ". $Name . " <" . $email . ">\r\n";

and $Name contained the sender's name and $email contained the sender's email address.

I tested it a few times to my phone xxxxxxxxxx@vtext.net and it came through but the from was always webmaster@secureserver.net instead of the sender's name and email address. So then I tested it using myyahooacct@yahoo.com and it sent the recipient header as their name and email address and if I wanted to it would let me reply to the sender. This is exactly what I want.

I tested a few more times and all of a sudden I get this message:

Warning: mail() [function.mail]: SMTP server response: 554 The message was rejected because it contains prohibited virus or spam content in D:\Hosting\3919142\html\mailsend.php on line 11

I am sure this is GoDaddy doing this because I switched the recipient back to my phone text address and got this same warning. I need a way around this. I made this PHP mail form for a friend's buisiness and they need to be able to get emails reliably and get them on their phone. Preferably they need to get them on their phone in plain text and so they can reply directly to the sender. Oh, and if I remove the $header from the mail line, it works again.

Any help is appreciated.

Thank you.
Zunebuggy :banghead:
Post Reply