jnroche Posted September 26, 2007 Share Posted September 26, 2007 does anybody know about how to make mail() in PHP work for an email address configured as an alias on GMAIL ???my emails do not get sent when sending to an email alias! HELP badly needed.here is a snippet: $emailmsg = 'test'; $recepient = 'agentx@encoredigital.com'; $sendmail = mail($recepient, 'Welcome to My Own Company', $emailmsg, "To: $fname $lname\r\n" . "From: admin@myowncompany.com\r\n" . "Reply-To: admin@myowncompany.com\r\n". "MIME-Version: 1.0\r\n" . "Content-type: text/html; charset=iso-8859-1" );**the recepeint as agentx@encoredigital.com is actually an email alias of my gmail account. there is no problem receiving emails directly from yahoo or other email service providers, hence, it does get sent to agentx@encoredigital.com the only problem is when running this code the I dont receive the email ever!! been trying this for a week now....... Link to comment Share on other sites More sharing options...
justsomeguy Posted September 26, 2007 Share Posted September 26, 2007 It doesn't have anything to do with PHP. All PHP does is generate an email with the correct headers and give it to the mail server or mail transfer agent. The MTA makes sure that the mail gets sent out, and where it goes from there you don't have control over. If you are forwarding your one account to the other account, nothing that PHP or the sending mail server does can even determine that it is being forwarded, the mail server at encoredigital.com is responsible for receiving the incoming email and forwarding it to the next address. You might want to check the redirection settings on the email account, or check with the mail server and make sure that it's not trashing the incoming mails. Set up another account on encoredigital.com or disable the redirecting, and test to make sure the server is receiving the message and not trashing it in the first place. Link to comment Share on other sites More sharing options...
jnroche Posted September 27, 2007 Author Share Posted September 27, 2007 It doesn't have anything to do with PHP. All PHP does is generate an email with the correct headers and give it to the mail server or mail transfer agent. The MTA makes sure that the mail gets sent out, and where it goes from there you don't have control over. If you are forwarding your one account to the other account, nothing that PHP or the sending mail server does can even determine that it is being forwarded, the mail server at encoredigital.com is responsible for receiving the incoming email and forwarding it to the next address. You might want to check the redirection settings on the email account, or check with the mail server and make sure that it's not trashing the incoming mails. Set up another account on encoredigital.com or disable the redirecting, and test to make sure the server is receiving the message and not trashing it in the first place.thanks much for the enlightenment i appreciate it. my last question would be why does, on the same scenario, the email is sent to the same recepient? I mean, using other website i can send an email to agentx@encoredigital.com?? (Is it probably they are using DOT NET rather than PHP to send emails to?) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.