Im having trouble with the Mail() function, I am using the following code that I found on this site:
<?php
$email_to = "somebody@email.com";
$email_subject = "Test E-Mail (This is the subject of the E-Mail)";
$email_body = "This is the body of the Email \nThis is a second line in the body!";
if(mail($email_to, $email_subject, $email_body)){
echo "The email($email_subject) was successfully sent.";
} else {
echo "The email($email_subject) was NOT sent.";
}
?>
The script is returning that the mail was sent but Im not getting the emails. I am a VB programmer and this has be puzzled. Does anyone know a diffrent way of sending emails in PHP???
Help with Mail() functionI need help with the Mail() function....
Page 1 of 1
4 Replies - 1575 Views - Last Post: 01 May 2006 - 01:45 PM
Replies To: Help with Mail() function
#2
Re: Help with Mail() function
Posted 01 May 2006 - 12:18 PM
Is your host properly set up to send mails generated by php?
#3
Re: Help with Mail() function
Posted 01 May 2006 - 12:41 PM
As far as I know its dedicated. But Im not 100% on that. Here is the information I do have:
Apache/1.3.33 Unix mod_auth_passthrough/1.8 mod_bwlimited/1.4 mod_log_bytes/1.2 mod_gzip/1.3.26.1a PHP/4.3.11 FrontPage/5.0.2.2634a mod_ssl/2.8.22 OpenSSL/0.9.7a
This is the information I got in the PHPINFO() to do with mail,
sendmail_from no value no value
sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
Path to sendmail /usr/sbin/sendmail -t -i
If this is of any help???
Apache/1.3.33 Unix mod_auth_passthrough/1.8 mod_bwlimited/1.4 mod_log_bytes/1.2 mod_gzip/1.3.26.1a PHP/4.3.11 FrontPage/5.0.2.2634a mod_ssl/2.8.22 OpenSSL/0.9.7a
This is the information I got in the PHPINFO() to do with mail,
sendmail_from no value no value
sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
Path to sendmail /usr/sbin/sendmail -t -i
If this is of any help???
#4
Re: Help with Mail() function
Posted 01 May 2006 - 12:46 PM
Are you setting
$email_to =
to a valid email address?
And is that address you are sending it to, doing any mail filtering such as spam filtering?
$email_to =
to a valid email address?
And is that address you are sending it to, doing any mail filtering such as spam filtering?
#5
Re: Help with Mail() function
Posted 01 May 2006 - 01:45 PM
Im sending it to my GMail account (with no filtering) and I am still not getting any emails from it. I've even looked in the Spam folder and there is nothing there. In VB there is a couple of ways to send emails, is this the same for PHP or is there only the Mail() function??
This post has been edited by rooneydavid: 01 May 2006 - 01:45 PM
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|