By default, the system is set up to log all emails into files. You have to configure this setting to send emails. You may use any of these supported services: SMTP, Sendmail, mailgun, and mandrill. To configure email, open the .env file and update these keys with your values. Warning! The system will generate errors if the mail fails. So double-check the email configuration. Talk to your email/hosting service provider if you’re not sure what to do.
Testing Emails
If you don’t have a mail server or just testing the application you can fake the actual sending of emails. Inta-Hrm has a log
driver and the Gmail
credentials for this job.
Log Driver
Instead of sending your emails, the log mail driver will write all email messages to your log files for inspection. All emails will be stored in storage/logs/inta-hrm-date.log
files. The default email driver is log
, so you don’t have to do anything to configure this driver.
Mailtrap
Finally, you may use a service like Mailtrap and the smtp
driver to send your email messages to a dummy mailbox where you may view them in a true email client. This approach has the benefit of allowing you to actually inspect the final emails in Mailtrap’s message viewer.
. . . MAIL_DRIVER=log MAIL_HOST=smtp.example.com MAIL_PORT=587 MAIL_USERNAME=user MAIL_PASSWORD=secret MAIL_ENCRYPTION=tls MAIL_FROM_ADDRESS=no-reply@example.com MAIL_FROM_NAME=No-Reply MAIL_REPLY_TO_ADDRESS=reply@example.com MAIL_REPLY_TO_NAME=Reply . . .
The MAIL_FROM_ADDRESS
and MAIL_FROM_NAME
will be used to send emails by your system where no specific sender information is available to use.