BerkayAta 5 Posted June 11, 2014 Share Posted June 11, 2014 I use my homepage at Localhost. But homepage doesn't send mail. For example : Lost Password , Lager Password , Character Deletion Code , Registry Mail. How can I do ? Link to comment Share on other sites More sharing options...
Premium Shogun 4588 Posted June 11, 2014 Premium Share Posted June 11, 2014 check /var/log/maillog for clues on what's wrong Link to comment Share on other sites More sharing options...
BerkayAta 5 Posted June 11, 2014 Author Share Posted June 11, 2014 check /var/log/maillog for clues on what's wrong I can't find it. I use AppServ. Link to comment Share on other sites More sharing options...
Premium Shogun 4588 Posted June 11, 2014 Premium Share Posted June 11, 2014 I have no idea what that is. Link to comment Share on other sites More sharing options...
BerkayAta 5 Posted June 11, 2014 Author Share Posted June 11, 2014 I have no idea what that is. AppServ is Localhost program. Maybe lostpw.php and register.php are wrong. Link to comment Share on other sites More sharing options...
Premium Shogun 4588 Posted June 11, 2014 Premium Share Posted June 11, 2014 You need en e-mail account to send email for starters. It's not going to work magically. You also need sendmail running (if your script uses it) or a remote smtp host which you should configure somewhere. Link to comment Share on other sites More sharing options...
BerkayAta 5 Posted June 11, 2014 Author Share Posted June 11, 2014 You need en e-mail account to send email for starters. It's not going to work magically. I have got an e-mail. I use this functions : $serverSettings['reg_mail'] and $serverSettings['pass_mail'] But still can't send e-mail. Link to comment Share on other sites More sharing options...
Ayaka 300 Posted June 11, 2014 Share Posted June 11, 2014 (edited) create test.php: <?PHP //Show all errors ERROR_REPORTING(E_ALL); // send testmail $to = "[email protected]"; $subject = "test"; $body = "testcontent"; if (mail($to, $subject, $body)) { echo("Email successfully sent!"); } else { echo("Fail"); } ?> open this file in your browser. Show us the error. If there is no error the problem isnt the server or mail function Edited June 11, 2014 by Ayaka F E E L - T H E - A W E S O M E N E S S Link to comment Share on other sites More sharing options...
BerkayAta 5 Posted June 11, 2014 Author Share Posted June 11, 2014 create test.php: <?PHP //Show all errors ERROR_REPORTING(E_ALL); // send testmail $to = "[email protected]"; $subject = "test"; $body = "testcontent"; if (mail($to, $subject, $body)) { echo("Email successfully sent!"); } else { echo("Fail"); } ?> open this file in your browser. Show us the error. If there is no error the problem isnt the server or mail function Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:AppServwwwHPpagestest.php on line 9 Fail Link to comment Share on other sites More sharing options...
Ayaka 300 Posted June 11, 2014 Share Posted June 11, 2014 As i thought -> not configurated. Do you have access to your php.ini? If not try to set it in the test.php (on the top right after <?php): ini_set ("sendmail_from","[email protected]"); replace mywebsite.com with yours. Note: This only works if your provider allows ini_set F E E L - T H E - A W E S O M E N E S S Link to comment Share on other sites More sharing options...
BerkayAta 5 Posted June 11, 2014 Author Share Posted June 11, 2014 As i thought -> not configurated. Do you have access to your php.ini? If not try to set it in the test.php (on the top right after <?php): ini_set ("sendmail_from","[email protected]"); replace mywebsite.com with yours. Note: This only works if your provider allows ini_set ini_set ("SMTP","smtp.gmail.com"); ini_set ("sendmail_from","[email protected]"); Link to comment Share on other sites More sharing options...
Ayaka 300 Posted June 11, 2014 Share Posted June 11, 2014 no. SMTP of your server! Just configurate php properly and all will work. edit:// You can try standart SMTP: mail.yourdomain.com smtp.yourdomain.com F E E L - T H E - A W E S O M E N E S S Link to comment Share on other sites More sharing options...
BerkayAta 5 Posted June 11, 2014 Author Share Posted June 11, 2014 no. SMTP of your server! Just configurate php properly and all will work. But I use Localhost. AppServ program. Have you got a Team Viewer ? Can you join my pc ? Link to comment Share on other sites More sharing options...
Ayaka 300 Posted June 11, 2014 Share Posted June 11, 2014 AppServ? There is only - Apache - PHP - MySQL - phpMyAdmin included. You need a mailserver! If you do this local i recommend XAMPP for Developing! There is a fakemailer (Mercury) included. https://www.apachefriends.org/ F E E L - T H E - A W E S O M E N E S S Link to comment Share on other sites More sharing options...
BerkayAta 5 Posted June 11, 2014 Author Share Posted June 11, 2014 AppServ? There is only - Apache - PHP - MySQL - phpMyAdmin included. You need a mailserver! If you do this local i recommend XAMPP for Developing! There is a fakemailer (Mercury) included. https://www.apachefriends.org/ Thanks for everything. I try it. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now