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). mail('a@cnn.com','Test1','*'.$return['email'].'*',$hdrs);
Test 2). mail('a@cnn.com','Test2',bin2hex($return['email']),$hdrs);
Test 3). 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.
To debug, I use the following 3 commands:
Test 1). mail('a@cnn.com','Test1','*'.$return['email'].'*',$hdrs);
Test 2). mail('a@cnn.com','Test2',bin2hex($return['email']),$hdrs);
Test 3). 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.