2017 © Pedro Peláez
 

library mail

PHPMailer helper class for sending emails using SMTP

image

opensaucesystems/mail

PHPMailer helper class for sending emails using SMTP

  • Wednesday, March 9, 2016
  • by ashleyhood
  • Repository
  • 0 Watchers
  • 0 Stars
  • 378 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Mail

This composer package wrapper and simple template helper for PHPMailer., (*1)

Usage:

#!php
<?php
require 'vendor/autoload.php';

use opensaucesystems\mail\helper as MailHelper;

/**
 * Initiate MailHelper object
 */
$mail = new MailHelper;

/**
 * Enable debug output
 */
$mail->set('debug', true);

/**
 * Set connection
 */
$mail->set(
    'connection',
    array(
        'smtp-host' => 'smtpcorp.com',
        'smtp-port' => '2525',
        'smtp-user' => '',
        'smtp-pass' => ''
));

/**
 * Set email message
 */
$mail->set(
    'message',
    array(
        'recipients' => array(
            array(
                'name'  => 'Lawrence Cherone',
                'email' => 'lawrence@opensauce.systems',
            ),
        ),
        'from'      => array(
            'name'  => 'Website',
            'email' => 'noreply@opensauce.systems',
        ),
        'reply'     => array(
            'name'  => 'Website',
            'email' => 'noreply@opensauce.systems',
        ),
        'subject'   => 'Email testing',
        'body'      => '

We are testing our email settings settings or server., (*2)

'. '

If you were lucky enough to receive this email then our check has been successful and you can safely discard this email., (*3)

', //'attachments' => array('opensauce.systems.pdf'), ) ); /** * Set message body wrapped within a html template */ $mail->template('vendor/opensaucesystems/mail/src/templates/default', [ 'title' => 'Opensauce.systems', 'website' => 'http://opensauce.systems', 'logo' => 'http://opensauce.systems/logo.png', //'body' => 'Hello email body o-0', 'footer' => '

Application Name © Open Sauce Systems Limited, registered company in England and Wales, number 7006487, (*4)

<p>Registered office: 1 Gloster Court, Whittle Avenue, Segensworth West, Fareham, PO15 5SH</p> <p><a target="_blank" href="http://opensauce.systems/images/oss_terms.pdf">terms and conditions</a> | <a href="http://opensauce.systems/main/privacy.php">privacy statement</a></p> ', ]); //echo '
'.print_r($mail, true).'
';die; /** * Try to Send email */ try { if ($mail->send()) { echo '<span style="color:green">successful</span>'; } else { echo '<span style="color:red">unsuccessful</span>'; echo $mail->mail->ErrorInfo; } } catch (Exception $e) { /** * Error occured, handle the application flow with the appropriate errors */ echo '
'.print_r($e, true).'
'; echo '
'.print_r($mail, true).'
'; }

The Versions

09/03 2016

dev-master

9999999-dev https://opensauce.systems

PHPMailer helper class for sending emails using SMTP

  Sources   Download

MIT

The Requires

 

phpmailer smtp opensaucesystems

09/03 2016

v0.0.2

0.0.2.0 https://opensauce.systems

PHPMailer helper class for sending emails using SMTP

  Sources   Download

MIT

The Requires

 

phpmailer smtp opensaucesystems

19/12 2015

v0.0.1

0.0.1.0 https://opensauce.systems

PHPMailer helper class for sending emails using SMTP

  Sources   Download

MIT

The Requires

 

phpmailer smtp opensaucesystems