Page 1 of 1

Mail & PHP form data – inconsistent results

Posted: Sat Nov 19, 2011 1:48 pm
by UBfoolin
I have a form where an email address is entered, then used with the MAIL command to send the email. Most of the time it works, sometimes it does not.

To debug, I use the following 3 commands:

Test 1).

Code: Select all

mail('a@cnn.com','Test1','*'.$return['email'].'*',$hdrs);
Test 2).

Code: Select all

mail('a@cnn.com','Test2',bin2hex($return['email']),$hdrs);
Test 3).

Code: Select all

mail('a@cnn.com','Test3',strlen($return['email']),$hdrs);
For reference, the mail command syntax is: mail(to,subject,message,headers,parameters)

When the email address is mike@yahoo.com, I get incorrect results where only Test2 and Test3 emails are received.
Test 1). No email is ever received
Test 2). The body is the 14 ASCII codes: 6d696b65407961686f6f2e636f6d
Test 3). The email body is: 14

When the email address is mike2@yahoo.com, I get correct results with the following 3 emails:
Test1). The email body is: *mike2@yahoo.com*
Test 2). The body is the 15 ASCII codes: 6d696b6532407961686f6f2e636f6d
Test 3). The email body is: 15

When the email address is mike@yahoo.comx, I get incorrect results with the following 2 emails:
Test 1). No email is ever received
Test 2). The body is the 14 ASCII codes: 6d696b65407961686f6f2e636f6d78
Test 3). The email body is: 15

When the email address is 1234567890@1234567890.123456, I get correct results with the following 3 emails:
Test 1). The email body is: *1234567890@1234567890.123456*
Test 2). The body is the 14 ASCII codes: 3132333435363738393040313233343536373839302e313233343536
Test 3). The email body is: 28

What is causing the 2 emails to not be sent? I need to reliably collect and use the email address entered on the form.

Re: Mail & PHP form data – inconsistent results

Posted: Sat Nov 19, 2011 8:20 pm
by twinedev
Are you checking raw mail, or after it has gone through spam filters? Sounds like they are tripping a filter somewhere.