1. Go to this page and download the library: Download multidialogo/raw-mailer-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/ */
multidialogo / raw-mailer-sdk example snippets
use multidialogo\RawMailerSdk\Facade;
use multidialogo\RawMailerSdk\Model\SmtpMessage;
$facade = new Facade(
Facade::DRIVERS['SES'], // or 'STD' for standard SMTP, 'FAKE' for testing
[
'version' => 'latest',
'region' => 'your-region',
'accessKey' => 'your-access-key',
'secretKey' => 'your-secret-key',
],
'/path/to/results', // Directory for result files
'catchall.example.com', // Optional catchall domain
5 // Max parallel jobs
);
// Creating a message
$message = new SmtpMessage(
'4f41efd7-38ce-4d30-8a32-155a6ec8001b',
'[email protected]'),
'[email protected]',
'Test subject',
[new SmtpHeader('X-some-header', 'header value here'),],
'Plain text content',
'<html lang="en"><body>Html content</body></html>',
[
'some/accessible/path/01.pdf',
'some/accessible/path/test.pdf',
'some/accessible/path/some file.pdf',
]
);
// Sending multiple emails in parallel
$messages = [$message, /* other SmtpMessage instances */];
$results = $facade->parallelSend($messages, 3); // 3 attempts for each message
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.