Jump to content

Homepage doesn't send mail


Recommended Posts

  • Replies 14
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Bronze
create test.php:
 
<?PHP
//Show all errors
ERROR_REPORTING(E_ALL);
 
// send testmail
$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 by Ayaka
Link to comment
Share on other sites

 

create test.php:
 
<?PHP
//Show all errors
ERROR_REPORTING(E_ALL);
 
// send testmail
$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

  • Bronze

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

Link to comment
Share on other sites

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.