php mail() issue

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
DraftBoards
Forum Newbie
Posts: 6
Joined: Thu May 22, 2008 3:30 pm

php mail() issue

Post by DraftBoards »

I am using the following code after a user submits a form. I want to send them a confirmation email, and myself an email with their info. However, the email is only sending to the user. This is very strange because in the code I send myself the email (line 5) before I send the user the email (line 6). Any reason why it wouldn't send both?

Code: Select all

        
ini_set("sendmail_from","webmaster@BadAssDraftBoards.com");
ini_set("SMTP","smtp.secureserver.net");
$MyAddress="webmaster@BadAssDraftBoards.com";
$Mail=mail("$MyAddress","Bad Ass Draft Board Order","$Body","From: $MyAddress");
$Mail2=mail($_POST["eMail"],"Bad Ass Draft Board Order Confirmation","$Body","From: $MyAddress");
 
DraftBoards
Forum Newbie
Posts: 6
Joined: Thu May 22, 2008 3:30 pm

Re: php mail() issue

Post by DraftBoards »

OK I modified the code to send to an address other than webmaster@badassdraftboards.com as well as send an email to the customer. This works, but I want my email sent to webmaster@badassdraftboards.com. Any ideas why this would happen? Am I restricted from sending an email to myself?
Post Reply