Ashwin Subedar
Ashwin Subedar

Reputation: 31

PHP Mailer with Custom Live Domain (hotmail/outlook)

I am trying to send mail with phpmailer using custom Live domain.

I want to know wether the $mail->host and $mail->Port I'm using are correct.

The following is the error:

Mailer Error: The following From address failed: [email protected] : Called Mail() without being connected

Here is my code:

require("../PHPMailer_5.2.4/class.phpmailer.php");

$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host       = "mail.live.com"; // SMTP server
$mail->SMTPDebug  = 0;                     // enables SMTP debug information (for testing)
// 1 = errors and messages
// 2 = messages only
$mail->SMTPAuth   = true;                  // enable SMTP authentication
$mail->SMTPSecure = "ssl";                 // sets the prefix to the servier
$mail->Host       = "smtp.live.com";      // sets GMAIL as the SMTP server
$mail->Port       = 465;

Upvotes: 3

Views: 3488

Answers (1)

George Sharvadze
George Sharvadze

Reputation: 570

As I remember PHP Mailer is outdated and is no longer developed/supported, take a look at Swift Mailer

Upvotes: 1

Related Questions