Hi,
I am able to get my mail function to work.
However, I don't receive the mails at all!
Why?
(peers into crystal ball) ... hmm, its too cloudy to see 😛
seriously, thats way too little information to go on. could be that sendmail isn't installed, or not configured properly ..
how do you mean mail() is working if youre not getting the emails? how do you know its working?
hmmm...
How can i check if the mail function works?
I'm using a form
if ($send == "YES") { //$headers = "From: '$_POST[client_email]'\r\n Reply-To: '$_POST[client_email]'\r\n"; $message = "'$_POST[$reason]'"; $yes = mail("me@me.com", "blah:: blah", $message); if ($yes) { echo "submitted successfully"; echo "<a href = 'package.php'>click here to go back</a>"; } else { echo "unsuccessful"; echo "<a href = 'package.php'>click here to go back</a>"; } } else if ($send == "NO") { echo "$domain_err"; } }
ok i finally am receiving the emails.
However, the emails are blank
$message = $POST[$reason] . $POST[$domain];
mail("myemail", "blah ", $message);
try:
echo '<pre>'; print_r ($_POST); echo '</pre>';
.. to see what's actually coming through in your POST variables.
if ($send == "YES") { //$headers = "From: '$_POST[client_email]'\r\n Reply-To: '$_POST[client_email]'\r\n"; $message = "'$_POST[$reason]'"; $yes = mail("me@me.com", "blah:: blah", "$message"); if ($yes) { echo "submitted successfully"; echo "<a href = 'package.php'>click here to go back</a>"; } else { echo "unsuccessful"; echo "<a href = 'package.php'>click here to go back</a>"; } } else if ($send == "NO") { echo "$domain_err"; } }
Try that.