Forum Moderators: coopster
$mail = new PHPMailer();
$mail -> isSMTP();
$mail -> HOST = "my ip";
However it keeps telling me it can't make the connection, stating the port as a possible problem. It is using the standard port 25, which is the correct port for my mail server. I have trawled through the online help and posted a message to the PHPMailer discussion group without any success.
Any thoughts?
Thanks.
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Host = "mail.mydomain.com";
$mail->SMTPAuth = true;
$mail->Username = "username";
$mail->Password = "password";
$mail->From = "me@mydomain.com";
$mail->FromName = "My Real Name";
$mail->AddAddress($recipient, $name);
Warning: fsockopen(): unable to connect to localhost:25 in /Users/admin/Sites/lib/phpmailer/class.smtp.php on line 105
message was not sentMailer Error: Language string failed to load: connect_host
Why is it trying to connect to localhost when I have set the HOST?