Portal Home > Knowledgebase > Articles Database > PHP Issue...WIERD
PHP Issue...WIERD
Posted by JediKnight2, 11-19-2008, 11:11 PM |
PHP Issue...WIERD
OK..I am scratching my head on this one..I have this PHP form that sends fields to this php file.
Code:
This gets sent to both email addresses successfully, notice the $to variable has two different emails at two different domains, both domains hosted on the same server. NOW this is where it gets WEIRD...I change the form to this
Code:
All I did was add "AMS" to the subject and only the second email address gets it...even if I take OUT the second email address...the first one will not receive it. If I change the email to the second email and leave the subject...the mail is delivered...IT MAKES NO SENSE! The weirder thing is I can change the subject to ANYTHING ELSE...but if I have AMS in there it will not deliver to that first email...ONLY the second..like I said..even if I put ONE email address..it STILL won't deliver to the first email address...
|
Posted by Xeentech, 11-20-2008, 04:48 AM |
Only thing I can think this early on a morning is your spam filter thinks maybe thinks AMS is what they're calling Viagra now?
You checking in webmail or a client like thunderbird? What about mail deamon logs?
|
Posted by JediKnight2, 11-20-2008, 12:00 PM |
I thought that too...however, when I tested it I replaced two of the email address with my own. The PHP mail went thru the same mail client and was checked by the same program, Thunderbird. It will come in to one email, but not the other. Also, I can take off the two email addresses and test them one at a time...it comes into one, but not the other. There is no spam filters on either email on the server side. I am racking my brain on this one....
|
Posted by carolinahosting, 11-20-2008, 02:29 PM |
Not all mailservers will send multiple emails on the To line.
Best to do this:
$email[0] = thisemail;
$email[1] = thatemail;
for ($x = 0; $x < $total_emails; $x++) {
Do email...
$sendemail = mail($email[$x], $subj, $msg, $header);
}
__________________
Custom PHP Designhttp://www.customphpdesign.com
PHP * HTML * Javascript
|
Posted by carolinahosting, 11-20-2008, 02:31 PM |
also, have the host check the other email. Possible the 2nd domain was hosted on that server?
check /etc/localdomains? Does the server still think it is a local email even that it is remote now?
__________________
Custom PHP Designhttp://www.customphpdesign.com
PHP * HTML * Javascript
|
Posted by carolinahosting, 11-20-2008, 02:36 PM |
sorry, I should have just posted one but have another idea.
Your headers are not very strong. Try these:
Code:
$sitename = "Your name here";
$admin_email = yourname@domain.com;
// email headers - This is fine tuned, please do not modify
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: $sitename <$admin_email>\r\n";
$headers .= "Reply-To: $sitename <$admin_email>\r\n";
$headers .= "X-Priority: 3\r\n";
__________________
Custom PHP Designhttp://www.customphpdesign.com
PHP * HTML * Javascript
|
Posted by foobic, 11-20-2008, 07:02 PM |
Quote:
Originally Posted by JediKnight2
All I did was add "AMS" to the subject and only the second email address gets it...even if I take OUT the second email address...the first one will not receive it. If I change the email to the second email and leave the subject...the mail is delivered...IT MAKES NO SENSE! The weirder thing is I can change the subject to ANYTHING ELSE...but if I have AMS in there it will not deliver to that first email...ONLY the second..like I said..even if I put ONE email address..it STILL won't deliver to the first email address...
Quote:
Originally Posted by JediKnight2
I thought that too...however, when I tested it I replaced two of the email address with my own. The PHP mail went thru the same mail client and was checked by the same program, Thunderbird. It will come in to one email, but not the other. Also, I can take off the two email addresses and test them one at a time...it comes into one, but not the other. There is no spam filters on either email on the server side. I am racking my brain on this one....
I think you're over-complicating this. If I read it right you have just one fault condition: Mail with subject starting "AMS" sent to a specific email address doesn't arrive. Sounds like a filter to me: mail sent to xxx@example.com with subject containing "AMS" -> do something special.
Check all your mail settings again, and / or ask your host for the mail log entries.
__________________
Chris
"Not everything that can be counted counts, and not everything that counts can be counted" - Albert Einstein
|
Posted by larwilliams, 11-20-2008, 08:07 PM |
Your e-mail headers are a strong culprit. I would recommend using PHPMailer to compose the e-mail (send it through SMTP) and that should result in much better headers (such as no references to "nobody", which several spam systems will identify, correct or not, as being likely spam).
__________________LCWSoft - Canadian web hosting (based in Newfoundland)Uptime Report
lawrencewilliams (at) lcwsoft.com
|
Add to Favourites Print this Article
Also Read
sysmond error (Views: 701)