Jump to content


Photo

Mail problems.


  • Please log in to reply
4 replies to this topic

#1 jabapyth

jabapyth
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 25 March 2006 - 04:27 PM

I have tried:
<?php
mail('my@email.net', 'Subject', 'Your message here.',
"To: The Receiver <recipient@some.net>\n" .
"From: The Sender <sender@some.net>\n")
?>

and I don't get an error, but I also don't recieve the email. What am I doing wrong?

#2 brissy_matty

brissy_matty
  • Members
  • PipPip
  • Member
  • 27 posts

Posted 01 June 2007 - 01:24 PM

example below:

$subject = "New Password For $username";
	$message = "Hi $username,\n we have reset your password.
	\n
	New Password: $random_password
	\n
	$siteurl/login.php
	\n
	Thanks!
	$admin_email
	\n
	This is an automated message system, please do not reply!";
	
	mail($email_address,$subject,$message,"From:$admin_email ");
	echo "Your password has been sent! Please check your email!<br />";

obviously change the message etc to suit yourself.

Cheers
Matt

#3 fluteflute

fluteflute
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 01 June 2007 - 02:03 PM

Also be aware most free hosts disable the mail function.

#4 fluteflute

fluteflute
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 01 June 2007 - 03:20 PM

Oh and I forgot error messages might be turned off.

#5 updwebmaster

updwebmaster
  • Members
  • PipPipPip
  • Advanced Member
  • 33 posts
  • LocationNC

Posted 18 December 2007 - 04:34 AM

ok I'm using the code for a different reason, but here's mine:
<?php

$email = $_POST["Email"];
$to = 'uberpilotdudes@bellsouth.net, ' . $_POST["Email"];
$subject = 'Application for Joining';
$from = 'From: ' . $email;
$date = date(n/j/y g:i:s e)
$text = 'Submission: ' . $date . '<br/>Name: ' . $_POST["Name"] . '<br/>Tags: ' . $_POST["Tags"] . '<br/>E-mail: ' . $_POST["Email"] . '<br/>Date: ' . $_POST["Date"] . '<br/>Other E-mails: ' . $_POST["other_emails"]
mail($to,$subject,$text);

?>
The page won't show up when I submit the form. It just shows up white...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users