I'm trying to send an email using PHP and I just can't seem to figure this out. I have a simple script to test with that looks like this... really simple stuff..
Code: Select all
$to = you@somewhere.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: me@somewhere.com' . "\r\n" .
'Reply-To: me@somewhere.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
All I keep getting back is -[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = smtp.blueyonder.co.uk
; http://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = me@somewhere.com
The crazy thing is that 1 mail actually came through but now all I keep getting is the error... any clues?Warning: mail() [function.mail]: Failed to connect to mailserver at "smtp.blueyonder.co.uk" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in