MarioApprentice Posted March 14, 2013 Share Posted March 14, 2013 Hey everyone. The mail() function wont send mail(). The return value is true, but the mail wasn't received. That was the first thing i tried. The second was the Mail.php from PEAR, mainly sending mail from gmail but that also didn't work. I didn't even want to upload the files from it. When I put a require_once(Mail.php), nothing happens and my program crashes with no warning or errors. Just a blank white screen. I've tried a lot of links from the google. Some of them are http://stackoverflow.com/questions/712392/send-email-using-gmail-smtp-server-from-php-page read this-> http://www.askapache.com/php/phpfreaks-eric-rosebrocks-phpmailer-tutorial.html https://forums.digitalpoint.com/threads/how-to-use-gmail-to-send-emails-in-php-using-phpmailer.871893/ when using other libraries like phpmailer or Mail.php from Pear, i tried everything i could think of. Changing prot from 465 to 25 even though its the default in phpmailer, changing stmp.gmail.com or ssl://smtp.gmail.com, messing with the phpmailer scripts and other things but nothing didn't help. Ive gone through many tutorials about phpmailer and Mail from Pear but couldn't make it happen. Eventualy, when all of it didn't work, i came back to php mail() function. This is the code... Thank you in advance for every help you give me. $to = 'emalToSend@gmail.com'; $subject = 'The subject'; $message = 'Some message'; $headers = 'From: me@gmail.com' // and other like reply-to and so on... mail($to, $subject, $message, $headers); Quote Link to comment https://forums.phpfreaks.com/topic/275670-sending-mail-but-failing/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.