Jump to content

mail() email address send-to formatting


mattisthenation

Recommended Posts

Good Morning,

 

I am having a problem with sending an email through my contact form. It is a script that I have used a number of times and never had a problem. The difference this time is that the email address I am using is formatted as follows:

 

"[email protected]"

 

notice the "." and the "-"

 

Would this cause a problem for the mail() function?

 

Thanks for any help

Link to comment
https://forums.phpfreaks.com/topic/132149-mail-email-address-send-to-formatting/
Share on other sites

Here is the code:

 


        $send_to = "[email protected]";
        @ini_set('sendmail_from', $sender_email);
$send_status = mail($send_to, $email_subject, $msg, $headers);
@ini_restore('sendmail_from');

 

($email_subject, $msg and $headers are set else where)

 

This works fine if I use an email address like "[email protected]"

What is housed in the $headers?

 

Doing some research

http://bugs.php.net/bug.php?id=14981

 

It was reported as an issue but ruled off as your mail server could be setup wrong to not allow that. I would check with your host and make an inquiry about it.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.