Jump to content

mail() ON gmail email aliases


jnroche
 Share

Recommended Posts

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

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...