1. Go to this page and download the library: Download syntaxerro/mail-api-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
syntaxerro / mail-api-sdk example snippets
// or use composer for auto-loading
/* Login using email address and password. */
$server = new \SyntaxErro\SyntaxServer("[email protected]", "smtp-api-sdk");
/* Create new message to [email protected] with content. */
$message = new \SyntaxErro\SmtpBundle\SyntaxEmail("Hello. I'm testing your API.", "[email protected]");
/* Set subject of message */
$message->setSubject("It's a test message!");
/* Set reply-to header. */
$message->setReplyTo("[email protected]");
/* Set my full name displayed instead of emails address. */
$message->setAs("Darth Vader");
/* Send message. */
$server->send($message);