Jump to content

Return Mail Address


StormTheGates

Recommended Posts

Hey all, having a very odd problem Ive never encountered.

 

I am trying to send mails via PHP's built in mail function. I set the From and Reply-To like so:

 

<?php
$headers = "From: [email protected]\r\n";
$headers .= "Reply-To: [email protected]\r\n";

 

Now here is when things get weird. When this email sends the return email gets changed to [email protected]. Oddly enough it only happens when the From is "contractortraining.energy.gov". For example:

 

If I send with these headers the email comes in as doe.golearnportal.org

 

However if I change the headers to be something like "sometest.org" or "nowhere.golearnportal.org" or anything other than "contractortraining.energy.gov" it will come through using the specified headers. It is only when I use "contractortraining.energy.gov" that the headers get changed.

 

Any ideas what could be responsible for this type of behavior? I dont think its a PHP issue at the moment, and this code is working successfully on several other servers.

Link to comment
https://forums.phpfreaks.com/topic/247593-return-mail-address/
Share on other sites

contractortraining.energy.gov is a DNS alias (CNAME) for doe.golearnportal.org. With email, those aliases are resolved to actual names.

 

Whoever manages DNS would have to change the record for the former to be identical to the latter.

Link to comment
https://forums.phpfreaks.com/topic/247593-return-mail-address/#findComment-1271491
Share on other sites

Aye thanks for that. I discovered it during an attempted tracert.

 

As it turned out in the end spam filters were activating because of a URL in the email, one that wasnt https for some reason. Also it seemed like the header that said "reply to:" was causing spam filters to activate as well.

 

Solved :D

Link to comment
https://forums.phpfreaks.com/topic/247593-return-mail-address/#findComment-1271507
Share on other sites

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.