|
Posted by Juliette on 12/21/05 04:04
number1.email@gmail.com wrote:
> I have tried the following code:
>
> FileName: index2.php
> ---------------------------------
>
> <?
> mail( "aaa@yahoo.com", "A", "B", "From: a...@aol.com" );
> echo "Finished Emailing.";
> ?>
>
> For some reason I don't get an email in my aaa@yahoo.com account, but
> the message "Finished Emailing" does display. Seems pretty
> simple...but it doesn't work. Can someone help me figure out what is
> wrong...or the best way to debug this? thanks...
>
The way you've set the test up, the 'finished emailing' message will
always show up, so it's no real test at all.
Try this instead and look at the result
if( mail( "aaa@yahoo.com", "A", "B", "From: a...@aol.com" ) ) {
echo 'Finished Emailing.';
}
else {
echo 'Sending mail failed';
}
If the message got send, try checking your Yahoo spam box - the message
might be filtered to it.
If the message sending failed, look at the error messages or warnings.
If none display, put the following line above the test:
error_reporting( E_ALL );
For more info, start reading: http://www.php.net/manual/en/function.mail.php
[Back to original message]
|