Send transactional emails from your Laravel project using Loops’ SMTP service.
transactionalId
value in the email payload.Create emails in Loops
Add SMTP variables
.env
file.MAIL_PASSWORD
should be an API key from your API Settings page.Send emails from Laravel
AuthEmail
:Content
definition using the text
key.You also need to pass the values for the recipient email address and any data variables in your email. In this case we are using a $user
property added to the constructor.view
option typically required for HTML emails in Laravel. Loops handles HTML rendering using the provided payload.Envelope
because the “from” address and subject are all defined within Loops on your transactional email.Now you can send transactional emails.to()
will not be used for sending the email even though it’s a required parameter. You have to provide the recipient’s email to the template itself.You can read more about sending emails from Laravel in their docs.