mailazy / php-sdk
Mailazy SDK for PHP
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/mailazy/php-sdk
Requires
- php: >=5.6
This package is not auto-updated.
Last update: 2022-06-24 08:27:28 UTC
README
This repository contains the open source PHP SDK that allows you to access the Mailazy Platform from your PHP app.
Please visit mailazy.com for more information.
Quickstart Guide
Installation
The Mailazy PHP SDK can be installed with Composer. Run this command:
composer require mailazy/php-sdk
Configuration
After successful install, you need to define the following Mailazy Account info in your project anywhere before using the Mailazy SDK or in the config file of your project:
Usage
<?php
define('MAILAZY_APIKEY','xxxxxxxxxxxxxxxxxxxxxxxx');// mailazy apikey replace at "MAILAZY_APIKEY"
define('MAILAZY_APISECRET','xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');// mailazy apikey replace at "MAILAZY_APISECRET"
require 'vendor/autoload.php';
$mailazyClient = new mailazyAPI();
$mailazyClient->setApikey(MAILAZY_APIKEY);
$mailazyClient->setApisecret(MAILAZY_APISECRET);
$mailazyClient->isHTML(true);
$mailazyClient->addAddress($email,$userName);
//Set CC address
$mailazyClient->addCC($email,$userName);
//Set BCC address
$mailazyClient->addBCC($email,$userName);
$mailazyClient->setSubject($subject);
$mailazyClient->setBody($message);
$mailazyClient->setFrom($senderEmail,$sendername);
$mailazyClient->addReplyTo($replyEmail,$replyname);
$mailazyClient->addAttachment($filePath);
$mailazyClient->send();
License
Please see the license file for more information.
Documentation
Getting Started - Everything you need to begin using this SDK.