Sending email simple


Do Elixir have built-in lib for sending email via SMTP? I know there is Bamboo or Swoosh, but i search for a simpler way. I don’t wanna make an application for this and config, just call a send_email and do the job for me.

Thank you!

both of these libraries have SMTP adapters, and both are pretty easy to use, probably easier than using SMTP-only libraries.

No, SMTP is not a built in. gen_smtp is more low level and in turn is used by bamboo or swoosh. However I wouldn’t call that “simpler”.

You can use Mix.install to pull in dependencies for scripts. My experience with functions, which aim to “just send mail” is that they’re mostly treated as sources for spam and you get a 50:50 chance of the receiver actually receiving the email at best. Also at least the one I’m familiar with (PHP) afaik uses sendmail on linux, where you got your dependency again, just on the language runtime level instead of the application level.

1 Like