Jump to content
  • 0

Homepage doesn't send mail


BerkayAta

Question

  • Answers 14
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

14 answers to this question

Recommended Posts

  • 0
  • VIP

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
  • 0

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
  • 0
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
  • 0

 

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
  • 0

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • 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.