Issue when sending an email?

Published 6 months ago by jonjie

Hi guys. I know you can help me with this problem. I did a lot of research through internet but I didn't found the solution. I'm trying to send a confirmation email using Mail::send() in laravel 5.1, I don't want to use any third party like mailgun or mandrill. The problem with this is all of the confirmation of the users is in their spam folder in gmail, and trash folder in outlook. Sometimes they didn't receive the confirmation. Why is that? Do you have any suggestion or idea with this? My website is also registered to https so I don't think this is the problem.

Thank a lot, Jonjie

arthurvillar

Configuring emails properly can be tricky but Laravel should be doing the hard work for you. How does your .env file looks like, can you post the mail section here?

jonjie

Yeah, indeed. Here's my mail section:

MAIL_DRIVER=smtp
MAIL_HOST=mail.mywebsite.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=mypassword
MAIL_ENCRYPTION=tls

Snapey
Snapey
6 months ago (957,155 XP)

If your domain has no reputation and the mail looks like spam, then sorry, into spam.

There are some things that can help, like making sure your email has a valid from and a valid reply-to address.

Check this article from Postmark for some good tips.

https://postmarkapp.com/guides/transactional-email-best-practices

ps, I use postmark to send my transactional email because I feel they are more likely to get it delivered than trying to do it myself.

jonjie

Hi @Snapey . I'll try to apply these good practices. Thanks :)

Please sign in or create an account to participate in this conversation.