In any event, I'm trying to get sendmail to work, but it's not... I get the following error:
- Code: Select all
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini
In my sendmail.ini file:
- Code: Select all
smtp_server=smtp.spamarrest.com
smtp_port=25
auth_username=myname
auth_password=mypassword
pop3_server=mail.spamarrest.com
pop3_username=myname
pop3_password=mypassword
In my php.ini file:
- Code: Select all
SMTP = smtp.spamarrest.com
smtp_port = 25
sendmail_from = myname@spamarrest.com
I've restarted apache, and attempted a very simple mail script:
- Code: Select all
$email = 'myemail@yahoo.com';
$from = "From: My Name <myname@spamarrest.com>";
$subject = "it worked";
$body = 'awesome';
if(mail($email,$subject,$body,$from)) { echo 'mail sent'; } else { echo 'mail failed'; }