Best way to send emails in golang


(Nader) #1

what is the best way to send email in golang ? here is my code

https://play.golang.org/p/i7gSRdd4Czh

there I was using my real pasword for the api from which I should send emails
I want to use this for my “Contact Me” form on my portfolio
is there a better way to do this than using my real email and password and this will be an open source project also as I will not pay for private hosting
thanks in advance


(Boban Acimovic) #2

You can use Mailgun and Go API, this is free for 10K emails per month, if I remember correctly.


(Nader) #3

then how do they do it ? or do I have to be an email service like gmail or outlook to do something like what I mentioned


(Boban Acimovic) #4

Just ioen an account on Mailgun and use Go API lib to send emails. You will get your credentials on Mailgun.

There are more such services.


(Boban Acimovic) #5