Hi,
I'm having probems getting the mail() function to work locally on IIS - have tried using both a basic mail() call and also phpmailer as below:
require_once('../class.phpmailer.php');
$mail = new PHPMailer();
$mail->SetFrom('myname@btinternet.com', 'Name');
$mail->AddReplyTo("myname@btinternet.com","Name");
$address = "myname@hotmail.com";
$mail->AddAddress($address, "My name");
$mail->Subject = "PHPMailer Test Subject via mail(), basic";
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!";
$mail->Body = "Here is the message";
if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
} else {
echo "Message sent!!!";
}
The following error message is output to browser:
"Could not instantiate mail function. Mailer Error: Could not instantiate mail function."
php.ini has the following settings:
[mail function]
; For Win32 only.
SMTP = mail.btinternet.com
smtp_port = 25
; For Win32 only.
sendmail_from = myname@btinternet.com
SMTP server is running and can send and receive emails OK in Outlook with same btinternet settings - also no problem using mail() function on hosting server on Linux.
Thanks in advance for any help