2017 © Pedro Peláez
 

library package-email

ZN Framework Email Package

image

znframework/package-email

ZN Framework Email Package

  • Thursday, July 12, 2018
  • by znframework
  • Repository
  • 3 Watchers
  • 0 Stars
  • 146 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 15 Versions
  • 46 % Grown

The README.md

, (*1)

ZN Framework Email Package

Follow the steps below for installation and use. , (*2)

Installation

You only need to run the following code for the installation. , (*3)

composer require znframework/package-email

Documentation

Click for documentation of your library. , (*4)

Example Usage

Basic level usage is shown below. , (*5)

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

ZN\ZN::run();

# The default settings are in the ZN\Email\EmailDefaultConfiguration file. 
# You can make your settings in this file.
# The Config::set() method should be used if you need to configure settings externally.
Config::services('email', 
[
    'driver' => 'smtp',
    'smtp'   =>
    [
        'host'      => '',
        'user'      => '',
        'password'  => '',
        'port'      => 587,
        'keepAlive' => false,
        'timeout'   => 10,
        'encode'    => '',  # empty, tls, ssl
        'dsn'       => false,
        'auth'      => true
    ],
    'general' =>
    [
        'senderMail'    => '',                  # Default Sender E-mail Address.
        'senderName'    => '',                  # Default Sender Name.
        'priority'      => 3,                   # 1, 2, 3, 4, 5
        'charset'       => 'UTF-8',             # Charset Type
        'contentType'   => 'html',              # plain, html
        'multiPart'     => 'mixed',             # mixed, related, alternative
        'xMailer'       => 'ZN',
        'encoding'      => '8bit',              # 8bit, 7bit
        'mimeVersion'   => '1.0',               # MIME Version
        'mailPath'      => '/usr/sbin/sendmail' # Default Mail Path
    ]
]);

Email::from('from@example.com')
     ->to('to@example.com')
     ->send('This is Subject', 'This is message.');

Output::display(Email::error());

The Versions