go-gomail / gomail

The best way to send emails in Go.
MIT License
4.29k stars 569 forks source link

How to set email importance and email-receipt? #183

Open AgeOfEmpiresII opened 1 year ago

AgeOfEmpiresII commented 1 year ago

Gomail is amazing!! I really love this way of encapsulating the code!!

could anyone help me plz, i dont know how to :

  1. set email importance (this is a very useful setting to me)
  2. set email-receipt

plz help me, thank you so much!

AgeOfEmpiresII commented 1 year ago

X-Priority: 3

how to set X-Priority ? plz help, thanx a lot!

wneessen commented 1 year ago

Importance is handled differently with different mail clients. Some expect the "Importance" header, some the "Priority", some "X-Priority" or even "X-MSMail-Priority" and all headers either use a number or string as value. Since this library is not maintained for over 7 years, I suggest you to use https://github.com/wneessen/go-mail instead, since that package even has a dedicated method for setting the Importance headers. https://pkg.go.dev/github.com/wneessen/go-mail#Msg.SetImportance