Simple mailer module that uses SendGrid API to send emails.
composer require toastnz/sendgrid-mailer
Add the following to your app.yml
:
Toast\SSSendGrid\SendGridMailer:
api_key: 'YOUR_SENDGRID_API_KEY'
Simply use the Email class provided by SilverStripe framework:
$email = new SilverStripe\Control\Email\Email();
$email->setFrom('[email protected]', 'John Doe');
$email->setTo('[email protected]', 'Jane Doe');
$email->setSubject('This is a test email');
$email->setBody('Hello there, this was sent using SendGrid');
$email->addAttachment('path/to/file.pdf', 'document.pdf');
$email->send();
Module rating system helping users find modules that are well supported. For more on how the rating system works visit Module standards
Score not correct? Let us know there is a problem