go-gomail / gomail

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

[feature] Flag to ignore invalid address error #191

Closed RandalTeng closed 7 months ago

RandalTeng commented 8 months ago

Can smtp client add a flag option set to ignore error that address is invalid? In my php program, the phpmail ignore the option in default, I want set gomail set it too, it could set to false as default, make the behavior is extraly like before. Like this:

dialer := gomail.NewDialer(conf.SMTP.Host, conf.SMTP.Port, conf.SMTP.Username, conf.SMTP.Password)
dialer.SetIgnoreAddressInvalid(true) // if have not this call, the behavior should same as before.
err := dialer.DialAndSend(mail)
if err != nil {
  return err
}
wneessen commented 8 months ago

This project is not maintained anymore. The owned unfortunately passed away. You might wanna have a look at go-mail instead.

RandalTeng commented 7 months ago

Thanks for the reply, I will check it out.