Page 1 of 1

Send Email

Posted: Thu Jun 16, 2005 11:22 am
by Parody

Code: Select all

$to = '".$email."';
$subject = "Homies For Life Password!";
$body = "Your password is : '".$rand."'";
if (mail($to, $subject, $body))
{
   echo("<p>Your password has been sent to the email address:'".$email."' </p>");
}
else
{
   die("<p>The email containing your password failed to send, please contact an Administator</p>");
}
Ok, that is my script, it works, I think, so I set it to send to my own email address, that was about 10 mins ago, I ran the script and it said it had sent, but.... I have not yet recieved the email. So my question is:
do I need to change any settings or install anything to send email via php on a localhost?

Posted: Thu Jun 16, 2005 11:35 am
by timvw
E-mail doesn't guarantee instant delivery... So it might take a while...

Posted: Thu Jun 16, 2005 11:36 am
by Parody
How long?

Posted: Thu Jun 16, 2005 11:43 am
by patrikG
More or less as long as a chestnut takes to fall off a barstool. ;)

Posted: Thu Jun 16, 2005 11:51 am
by Parody
So, it depends on the speed you hit it, this baseball bat should make quick work of my server :evil: :evil:

Posted: Thu Jun 16, 2005 11:55 am
by patrikG
No. The chestnut just sits on the barstool. It might fall, it might not. Time will tell ;)

And no, you don't need to configure anything for PHP's mail() function to work.

Posted: Thu Jun 16, 2005 11:56 am
by Parody
I wanna hit the chestnut! :P

Posted: Thu Jun 16, 2005 11:57 am
by patrikG
That's where you go wrong. Chestnuts fall only from trees, not usually from barstools ;)

Posted: Thu Jun 16, 2005 11:59 am
by Parody
Ok, i'm gonna hit all the chestnuts, off the trees and off the barstools, and wherever else they hang their hats! I'm gonna kill em all!!!!!!!!!!!!!!! :!: :!: :!:

Posted: Thu Jun 16, 2005 12:00 pm
by patrikG
btw. check you PMs, please.

Posted: Thu Jun 16, 2005 12:04 pm
by Parody
Is that better?