PHP code example of ride / lib-mailer

1. Go to this page and download the library: Download ride/lib-mailer 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/ */

    

ride / lib-mailer example snippets




use ride\service\MailService;

function sendMail(MailService $mailService) {
    $contentVariables = array('user' => 'My User', 'url' => 'http://www.github.com');
    $recipientVariables = array('recipient1' => '[email protected]', 'recipient2' => '[email protected]');
    $mailTemplate = 5;
    $locale = 'en';

    $mailService->sendMailTemplate($contentVariables, $recipientVariables, $mailTemplate, $locale);
}