Questions tagged [gomail]

gomail provides a simple interface to compose emails and to mail them efficiently in golang.

gomail provides a simple interface to compose emails and to mail them efficiently in the Go programming language.

23 questions
0
votes
1 answer

How to send mail with multiple file attachements

I have a ContactForm on my Vue.js app that is used to send emails to my Go backend, everything seems to be working fine except the file uploading. This is the function that pushes the files to the form. onFileChanged (e) { this.files = new…
0
votes
2 answers

How to set the "MAIL FROM" header for an email?

In the SparkPost (an email sending provider) documentation for setting "bounce domains" it says specified in the [...] mail from header in the SMTP payload https://www.sparkpost.com/docs/tech-resources/custom-bounce-domain/ But when I set the…
Brian Leishman
  • 8,155
  • 11
  • 57
  • 93
0
votes
2 answers

sending email with optional attachment in gomail v2

I have a package mystuff which deals with sending an email. package mystuff import ( "crypto/tls" "gopkg.in/gomail.v2" ) type Params struct { From, To, Subject, Body, Filename string } func Mail(p Params) (err error) { m :=…
Radoslaw
  • 172
  • 1
  • 16
0
votes
1 answer

How to send bcc email via `exim -t`? ["sendmail look alike" mode]

I'm using golang to send email with exim via following method const sendmail = "/usr/sbin/exim" func submitMail(m *gomail.Message) (err error) { cmd := exec.Command(sendmail, "-t") cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr pw,…
Garvit Jain
  • 1,862
  • 2
  • 19
  • 27
0
votes
1 answer

go-mail embed image not working with exe

I am using go-mail to send mail. I am embedded image in to mail by m.Embed("common/static/img/logo.png") and use this in HTML by It works fine when running main.go. But when I bould project and execute main.exe I am getting error "The system…
0
votes
1 answer

Creating a contact form with Gomail

I am currently learning Go, and I am trying to create a contact form. I was using the default net/smtp package to send my mail, but then I stumbled upon Gomail. It made it so much easier to send an email. Here is the html for the contact…
cmelone
  • 69
  • 2
  • 10
-1
votes
1 answer

How to receive messages from all the people who fill the contact form?

I have a contact form, through which I receive messages. But it is received only from one email address because I only gave that email address in the abc.SetHeader("To", "email2@gmail.com"). I want to receive messages from all the people who want to…
user17198758
-1
votes
1 answer

gomail noauth example crashes

I am trying to follow this example: package main import ( "gopkg.in/gomail.v2" ) func main() { m := gomail.NewMessage() m.SetHeader("From", "from@example.com") m.SetHeader("To", "to@example.com") m.SetHeader("Subject",…
qed
  • 22,298
  • 21
  • 125
  • 196
1
2