PHP code example of xsga / bbphp-emailsender-resend-adapter
1. Go to this page and download the library: Download xsga/bbphp-emailsender-resend-adapter 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/ */
xsga / bbphp-emailsender-resend-adapter example snippets
use Psr\Log\NullLogger;
use Xsga\BBPHP\EmailSender\Adapter\Resend\ResendEmailService;
use Xsga\BBPHP\EmailSender\Core\Application\Dto\EmailDataDto;
$emailData = new EmailDataDto();
$emailData->sender = '[email protected]';
$emailData->senderName = 'Support Team';
$emailData->recipients = ['[email protected]'];
$emailData->subject = 'Welcome to our platform';
$emailData->body = '<h1>Hello!</h1><p>Thank you for joining us.</p>';
$emailService = new ResendEmailService(
new NullLogger(),
're_xxxxxxxxxxxxxxxxxxxxxxxxx'
);
$emailService->send($emailData);