View previous topic :: View next topic |
Author |
Message |
talkerzero Grandmaster Cheater
Reputation: 1
Joined: 24 Jul 2008 Posts: 560 Location: California
|
Posted: Wed Jul 01, 2009 5:33 pm Post subject: [PHP] Sending mail with mail() function |
|
|
This line..
mail('[email protected]', 'thesubject', $Description, 'From: ' . $Email . "\n");
..is returning true but not sending the email. I send it & check my email, and nothing's there. $Description and $Email are both non-empty variables. At the end of the header, I've tried both "\r\n" and "\n", neither of which produce successful results. Help?
|
|
Back to top |
|
 |
shhac Expert Cheater
Reputation: 0
Joined: 30 Oct 2007 Posts: 108
|
Posted: Wed Jul 01, 2009 5:44 pm Post subject: |
|
|
your header isn't right, try something like this:
Code: | "Content-type: text/plain; charset=iso-8859-1\nFrom:".$email."\nReply-To:".$email |
|
|
Back to top |
|
 |
talkerzero Grandmaster Cheater
Reputation: 1
Joined: 24 Jul 2008 Posts: 560 Location: California
|
Posted: Wed Jul 01, 2009 5:59 pm Post subject: |
|
|
Code: | $to = "[email protected]";
$subject = "subject";
$message = "themessage";
$headers = "Content-type: text/plain; charset=iso-8859-1\nFrom:" . $Email . "\nReply-To:" . $Email;
mail($to, $subject, $message, $headers); |
Still failing.. (same error as before)
|
|
Back to top |
|
 |
shhac Expert Cheater
Reputation: 0
Joined: 30 Oct 2007 Posts: 108
|
Posted: Wed Jul 01, 2009 9:06 pm Post subject: |
|
|
Does php.ini have a line called STMP ?
You might need to check your STMP server working properly
|
|
Back to top |
|
 |
jackyyll Expert Cheater
Reputation: 0
Joined: 28 Jan 2008 Posts: 143 Location: here
|
Posted: Wed Jul 01, 2009 9:23 pm Post subject: |
|
|
You need to install sendmail, or another SMTP server.
|
|
Back to top |
|
 |
|