2017 © Pedro Peláez
 

library swiftmailer-wrapper

wrapper function for swiftmailer

image

shadiakiki1986/swiftmailer-wrapper

wrapper function for swiftmailer

  • Wednesday, August 30, 2017
  • by shadiakiki1986
  • Repository
  • 1 Watchers
  • 0 Stars
  • 607 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 6 Versions
  • 3 % Grown

The README.md

Wrapper function for using Swiftmailer (in php), (*1)

Available on packagist, (*2)

Install: composer require shadiakiki1986/swiftmailer-wrapper:dev-master, (*3)

Use:, (*4)

require_once __DIR__.'/vendor/autoload.php';

\SwiftmailerWrapper\Utils::mail_attachment(

  // attachments
  array("/path/to/file1","/path/to/file2"),

  // to, from, reply emails
  "to@email.com",
  "from@email.com",
  "From Name",
  "reply@email.com",

  // subject, body
  "This is a subject",
  "This is a message. It <i>supports</i> html.",

  // config array
  array(
    "host"=>"smtp.server.com",
    "port"=>"123",
    "username"=>"myUser",
    "password"=>"pizza"
  )

);

Files can be renamed in attachment by passing files parameter as follows:, (*5)

  array("newName1"=>"/path/to/file1","newName2"=>"/path/to/file2"),

To use encrypted smtp, add security key to the config array. Valid values are: false, ssl, tls, (*6)

To add a backup SMTP server and credentials, add a backup key similar to the original config array, i.e. with host, port, username, password, security., (*7)

Testing

composer install
SWIFTMAILER_WRAPPER_EML1=my@gmail.com \
  SWIFTMAILER_WRAPPER_PWD1=password1 \
  SWIFTMAILER_WRAPPER_EML2=another@gmail.com \
  SWIFTMAILER_WRAPPER_PWD2=password2 \
  composer test

Note that emails above should be gmail accounts because the tests define the gmail server explicitly, (*8)

The Versions

30/08 2017

dev-master

9999999-dev https://github.com/shadiakiki1986/swiftmailer-wrapper

wrapper function for swiftmailer

  Sources   Download

CC0 1.0 Universal

The Requires

 

The Development Requires

by Shadi Akiki

swiftmailer

30/08 2017

1.0.2

1.0.2.0 https://github.com/shadiakiki1986/swiftmailer-wrapper

wrapper function for swiftmailer

  Sources   Download

CC0 1.0 Universal

The Requires

 

The Development Requires

by Shadi Akiki

swiftmailer

30/05 2017

1.0.1

1.0.1.0 https://github.com/shadiakiki1986/swiftmailer-wrapper

wrapper function for swiftmailer

  Sources   Download

CC0 1.0 Universal

The Requires

 

The Development Requires

by Shadi Akiki

swiftmailer

30/05 2017

1.0.0

1.0.0.0 https://github.com/shadiakiki1986/swiftmailer-wrapper

wrapper function for swiftmailer

  Sources   Download

CC0 1.0 Universal

The Requires

 

The Development Requires

by Shadi Akiki

swiftmailer

13/10 2016

0.2

0.2.0.0 https://github.com/shadiakiki1986/swiftmailer-wrapper

wrapper function for swiftmailer

  Sources   Download

CC0 1.0 Universal

The Requires

 

The Development Requires

by Shadi Akiki

swiftmailer

27/09 2016

0.1

0.1.0.0 https://github.com/shadiakiki1986/swiftmailer-wrapper

wrapper function for swiftmailer

  Sources   Download

CC0 1.0 Universal

The Requires

 

The Development Requires

by Shadi Akiki

swiftmailer