Mail

To send email with WordPress you can use the wp_mail helper method. WordPlate provides a simple way to add custom SMTP credentials.

Installation

Require the mail package, with Composer, in the root directory of your project.

$ composer require wordplate/mail

Then update the credentials in your .env environment file with your SMTP keys.

MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null

Then login to the WordPress administrator dashboard and active the plugin.

Please visit the WordPress documentation to read more about the phpmailer_init action hook.