Hello,
I hope someone can help me with this problem. I dont have much experience with php code.
I have a working mail server which I have recently installed website baker on.
It works fine but I cannot send email from the php contact form on the website that I create. I have exhausted many options to try and resolve this, and it seems that it is not a WB issue but a php one.
The weird thing is that I already have a ticketing system running on the server which also uses a php contact form and its email functionality works fine.
I was advised to test if php was working correctly by creating a file such as mail.php, with the following code:
<?php
if (mail("matthew@myemail.com","Hello","This is a test")) {
echo "Success";
} else {
echo "Failure";
}
?>
I did this and then when I browse to http://mymailserver.com/mail.php I get a success message in the browser but no email is sent.
If I put an incorrect email address in the script I get a failed message.
In my mail logs I get the following message:
delay=00:00:00, xdelay=00:00:20, mailer=relay, pri=30056, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k7A5uuN0010589 Message accepted for delivery)
The message is accepted for delivery but nothing comes through?
As I stated this is a fucntioning mail server (Centos 4.3 and sendmail). I also can send email from other php scripts within a ticketing program (Hesk)
These are the php rpm's I have installed on the machine:
php-xmlrpc-4.3.9-3.15
php-mbstring-4.3.9-3.15
php-mysql-4.3.9-3.15
php-pear-4.3.9-3.15
php-odbc-4.3.9-3.15
php-imap-4.3.9-3.15
php-4.3.9-3.15
php-snmp-4.3.9-3.15
php-domxml-4.3.9-3.15
php-ncurses-4.3.9-3.15
php-ldap-4.3.9-3.15
php-pgsql-4.3.9-3.15
php-gd-4.3.9-3.15
php-devel-4.3.9-3.15
Any help would be greatly appreciated!
Cheers
Matt