How to make sending mail from phoenix application through local postfix install work

Ok, this is the good reason. So, why the services like mailgun and others are more trusted? They can’t be used to send spam? What are the means to make my domain trusted? I’ve already configured dns stuff like PTR, dkim.
In my case I only need my application to send registration activation letters and send notifications about fresh content on the site related to the user, like this forum does.

And yes, my test emails get into spam folder in gmail, some other mail providers don’t filter my emails. But I had a hope that when I will add a company contacts like address in the bottom of my real letters it would help with this problem and they won’t get into spam.

These services are more trusted because they gained reputation. You gain reputation with time, especially when you are high volume sender. Additionally there are whitelists of “good” email services, so getting there will require a lot of time and work.

About SMTP servers, you are using system (BEAM) that was designed to write servers and SMTP is quite simple protocol. so why not use Erlang’s implementation of SMTP?

About external services, it all depends on the volume. SendGrid offers 40k emails per month in free plan, Mailgun is offering 10k, so if you are starting these numbers should be enough for start, and after that the proces are pretty low. So really rethink your approach to using external services.

you should definitely look into SPF, DKIM, and DMARC…

send a mail to mailtest@unlocktheinbox.com and you’ll get a report back (warning lot of upsell in that report but should get u going…)

1 Like

I’ve already configured SPF, DKIM and DMARC, and tested sending an email to some testing site where I’ve got 10 points out of 10. But nevertheless gmail puts my test emails into the spam folder.

1 Like

@hauleth, I already use gen_smtp by the hood, it’s required if I use Swoosh’s SMTP adapter. There is only example how to send emails through some relay in swoosh’s repo, so I didn’t know that I can do it without third party software, can you give me a link to an example of how to do it purely in elixir?

And thank you for the info about SendGrid, hauleth, for my use case it will be enough I think. But anyway I’m still interested in sending mail from application without third party services, at least for the education purposes, so it would be great if you can give me an example of pure elixir implementation.

UPD: I’ve read SendGrid’s plan and it appears they give 40000 emails for free only for the first month, after that only 100 emails per day.

Maybe a little tip is to signup through heroku… Twilio SendGrid - Add-ons - Heroku Elements seems free plan have 12K mails/month - I use that and I’m certainly above 100 some days…

also remember there is a distinct difference between transactional mails - and marketing mails…