Page 1 of 1

Mail not sending??

Posted: Sat Jun 07, 2008 8:43 pm
by josh22x
Hey:

I am having trouble with this PHP mail script.

I have implemented the mail() function in PHP. It seems to be working except for the fact that it will not send the mail. I have been told that I need to change some of the configuration in the php.ini file. However, I am not sure which ones I need to change??

Especially since I am using Unix, do I need to change the: sendmail_path = ?

If so what does it need to be set to?

Secondly, do I need to set any of the other configuration for this function?

Thanks!

Here is the code if needed:

Code: Select all

<?php
 
$name = $_REQUEST['name'];
$last = $_REQUEST['last'];
$email = $_REQUEST['email'];
$comments = $_REQUEST['comments'];
 
$content = "$name $last with an email of: $email made the following comments on your site: $comments";
 
$test = mail('j22cal@aol.com', 'Contact from web viewer', $content);
 
if ($test == true)
{
echo "Email was sent sucessfully";
 }
 else { 
 echo "Email did not submit!!!";
 }
 echo "<br></br>";
?>
 
I do not believe there is anything terribly wrong with the script, but it keeps outputting "Email did not submit!!".

Thanks for your help!

Re: Mail not sending??

Posted: Sat Jun 07, 2008 9:44 pm
by josh22x
Ok, well it did return true after installing sendmail, which I did not know I had to install, however, the email address that is assigned did not receive any mail??

It is also not in spam. Do you know what could be wrong?

By the way here is the out put of nmap -sT localhost:

PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
80/tcp open http
139/tcp open netbios-ssn
445/tcp open microsoft-ds
3306/tcp open mysql
5900/tcp open vnc
8118/tcp open privoxy

Nmap done: 1 IP address (1 host up) scanned in 0.132 seconds

- Could it be because 25 is not open??

Thanks!

Re: Mail not sending??

Posted: Wed Jun 11, 2008 10:14 am
by josh22x
anybody got any ideas?