Mail fuction not working
Posted: Sun Apr 17, 2005 3:28 pm
Hi guys,
I have a bit of a sticky problem right now i'm trying to send an e-mail from a php script and unfortualy it doesn't work.
PHP script
Every time i run it the else message appears and when i used the or die sql query this error appears Parse error: parse error, unexpected T_LOGICAL_OR in /var/www/html/william/Call Center/mailtest.php on line 10.
I've been looking on the net and people suggsted about the SMTP settings in the php.ini file but they seem to be fine.
Any suggestions would be cool
I have a bit of a sticky problem right now i'm trying to send an e-mail from a php script and unfortualy it doesn't work.
PHP script
Code: Select all
<?php
$mail_to= $_POST['Email'];
$mail_subject= $_POST['Subject'];
$mail_message= $_POST['Content'];
if
(mail($mail_to,$mail_subject,$mail_message))or die(mysql_error());
echo "Successfully sent the e-mail \"$mail_subject\" to $mail_to.";
else
echo "The message was unable to be sent to \"$mail_to\" with the message subject \"$mail_subject\".";
?>I've been looking on the net and people suggsted about the SMTP settings in the php.ini file but they seem to be fine.
Any suggestions would be cool