To start using SendPulse SMTP service with PHP Mailer libraries,  find an SMTP example in the test_smtp_basic.php file in the examples folder of the library.

Be sure to add these two necessary files on your server:

  • class.phpmailer.php
  • class.smtp.php

Log in to your SendPulse account for the smtp settings:

Next step is including the library and instantiate a PHPMailer object:

$mail = new PHPMailer();

After that configure the object to use SMTP.

Below is an example of the code:


require 'phpmailer/PHPMailerAutoload.php';

$mail = new PHPMailer;


$mail->Host = '';
$mail->SMTPAuth = true;
$mail->Username = ''; 
$mail->Password = 'qwe23423de3';
$mail->SMTPSecure = 'ssl';
$mail->Port = '465';

Host: SendPulse smtp server - '';

SMTPAuth: whether or not Authentication applies - in our case it does, so the value should be = true;

Username: your SendPulse login email;

Password: password for the same SendPulse account;

SMTPSecure: - this is the encryption type, which corresponds to the port number below:

Port: '465' - then encryption type is SMTPSecure = 'ssl';

Now specify properties of the email you will be sending out: charset type, email address messages will be sent from, sender's name, recipient's email, subject line, body of the message.

$mail->CharSet = 'UTF-8';
$mail->From = '';
$mail->FromName = 'Andrew';
$mail->Subject = 'Headsup';
$mail->Body = 'Hello!';
$mail->SMTPDebug = 1;

Other useful articles

Popular in Our Blog

User Rating: 5 / 5 (4)

Rate this article about "Using SendPulse SMTP-server with the PHP Mailer"

Try SendPulse SMTP for free

SendPulse uses cookies to enhance your browsing experience. If you continue to use this site, you consent to our use of cookies. Details