2017 © Pedro Peláez
 

library mail-api-sdk

Simple PHP SDK for syntax-shell.me HTTP <=> SMTP|IMAP api

image

syntaxerro/mail-api-sdk

Simple PHP SDK for syntax-shell.me HTTP <=> SMTP|IMAP api

  • Sunday, April 17, 2016
  • by syntaxerro
  • Repository
  • 1 Watchers
  • 2 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

PHP SDK for syntax-shell.me mail server API

Installation

composer require syntaxerro/mail-api-sdk

Test

phpunit --bootstrap=vendor/autoload.php tests/ 

Usage

require __DIR__.'/src/SyntaxErro/SyntaxServer.php';
require __DIR__.'/src/SyntaxErro/SmtpBundle/SyntaxEmail.php';
require __DIR__.'/src/SyntaxErro/SmtpBundle/SmtpException.php';
// or use composer for auto-loading

/* Login using email address and password. */
$server = new \SyntaxErro\SyntaxServer("smtp@sntx.ml", "smtp-api-sdk");

/* Create new message to recipient@example.com with content. */
$message = new \SyntaxErro\SmtpBundle\SyntaxEmail("Hello. I'm testing your API.", "recipient@example.com");

/* Set subject of message */
$message->setSubject("It's a test message!");

/* Set reply-to header. */
$message->setReplyTo("other@email.com");

/* Set my full name displayed instead of emails address. */
$message->setAs("Darth Vader");

/* Send message. */
$server->send($message);
Multiple recipients
$message = new \SyntaxErro\SmtpBundle\SyntaxEmail("Hello. I'm testing your API.", ["recipient@example.com", "other@recipient.com"]);

or, (*1)

$message = new \SyntaxErro\SmtpBundle\SyntaxEmail("Hello. I'm testing your API.");
$message
    ->addRecipient("recipient@example.com")
    ->addRecipient("other@recipient.com");

The Versions

17/04 2016

dev-master

9999999-dev

Simple PHP SDK for syntax-shell.me HTTP <=> SMTP|IMAP api

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

by Syntax Error

17/04 2016

1.0

1.0.0.0

Simple PHP SDK for syntax-shell.me HTTP <=> SMTP|IMAP api

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

by Syntax Error