OilSheikh Posted April 24, 2007 Share Posted April 24, 2007 Guys, I am working on this Test PHP Code and it ain't working properly. I never get mail at the Recipient address! The SMTP server is GMAIL. Yes, I HAVE edited PHP.INI and SENDMAIL. Yes, I HAVE telnetted to the SMTP server and it was a success. Yes, IT WORKS with MercuryMail ( part of XAMPP) on localhost [move]MAILTEST.PHP[/move] <? // ---------------- SEND MAIL FORM ---------------- // send e-mail to ... $to="[email protected]"; // Your subject $subject="Test"; // From $header="from: zax <[email protected]>"; // Your message $message="Hello \r\n"; $message.="This is test\r\n"; $message.="Test again "; // send email $sentmail = mail($to,$subject,$message,$header); // if your email succesfully sent if($sentmail){ echo "Email Has Been Sent ."; } else { echo "Cannot Send Email "; } ?> [move]PHP.INI - mail part[/move] [mail function] ; For Win32 only. SMTP = smtp.gmail.com smtp_port = 25 ; For Win32 only. sendmail_from = [email protected] ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). sendmail_path = "C:\sendmail\sendmail.exe -t" [move]SENDMAIL[/move] ; configuration for fake sendmail [sendmail] ; you must change mail.mydomain.com to your smtp server smtp_server=smtp.gmail.com ; the default domain for this server will be read from the registry ; this will be appended to email addresses when one isn't provided ; if you want to override the value in the registry, uncomment and modify ;default_domain=local ; log smtp errors to error.log (defaults to same directory as sendmail.exe) ; uncomment to enable logging ;error_logfile=error.log ; create debug log as debug.log (defaults to same directory as sendmail.exe) ; uncomment to enable debugging ;debug_logfile=debug.log ; if your smtp server requires authentication, modify the following two lines [email protected] auth_password=xxx ; if your smtp server uses pop3 before smtp authentication, modify the ; following three lines ;pop3_server= ;pop3_username= ;pop3_password= ; to force the sender to always be the following email address, uncomment and ; populate with a valid email address. this will only affect the "MAIL FROM" ; command, it won't modify the "From: " header of the message content ;force_sender=me@localhost ; sendmail will use your hostname and your default_domain in the ehlo/helo ; smtp greeting. you can manually set the ehlo/helo name if required ;hostname=localhost Guys, please help me. It's very urgent. Link to comment https://forums.phpfreaks.com/topic/48389-phps-mail-mail-never-reaches-inbox/ Share on other sites More sharing options...
tauchai83 Posted April 24, 2007 Share Posted April 24, 2007 sometime the mail did sent to your mailbox, but it is in your Junk folder. Did you check on it? Link to comment https://forums.phpfreaks.com/topic/48389-phps-mail-mail-never-reaches-inbox/#findComment-236596 Share on other sites More sharing options...
OilSheikh Posted April 24, 2007 Author Share Posted April 24, 2007 Thanks for the reply tauchai83 But - Nah... there's nothing in the Junk mail folder. It didn't come there. Link to comment https://forums.phpfreaks.com/topic/48389-phps-mail-mail-never-reaches-inbox/#findComment-236604 Share on other sites More sharing options...
OilSheikh Posted April 24, 2007 Author Share Posted April 24, 2007 Anyone else??? Plzzz..... :'( Link to comment https://forums.phpfreaks.com/topic/48389-phps-mail-mail-never-reaches-inbox/#findComment-236871 Share on other sites More sharing options...
OilSheikh Posted April 24, 2007 Author Share Posted April 24, 2007 IS there NO ONE to help this poor fellow? :'( Link to comment https://forums.phpfreaks.com/topic/48389-phps-mail-mail-never-reaches-inbox/#findComment-237270 Share on other sites More sharing options...
shaunrigby Posted April 24, 2007 Share Posted April 24, 2007 Dude, Read this, although it mentions Hotmail, i think its the same for Gmail: http://www.phpfreaks.com/forums/index.php/topic,135713.0.html Link to comment https://forums.phpfreaks.com/topic/48389-phps-mail-mail-never-reaches-inbox/#findComment-237279 Share on other sites More sharing options...
OilSheikh Posted April 24, 2007 Author Share Posted April 24, 2007 Thanks for the reply, shaunrigby. That post was directed at getting the Mail to be delivered to the Inbox instead of the JUNK E-MAIL folder. Thing is, My e-mails don't even go to JUNK E-MAIL! lol. And I don't mind if the mail is delivered to the junk folder. Hmph. Searching through the Forum didn't reveal much. It seems many PHP mail( ) posts were unanswered. I think I'll try removing my Router and connect through the ADSL Modem and see if it fixes things. Link to comment https://forums.phpfreaks.com/topic/48389-phps-mail-mail-never-reaches-inbox/#findComment-237296 Share on other sites More sharing options...
shaunrigby Posted April 24, 2007 Share Posted April 24, 2007 Dude, follow it, it will at least get it into your junk mail folder Link to comment https://forums.phpfreaks.com/topic/48389-phps-mail-mail-never-reaches-inbox/#findComment-237297 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.