TimothyYe / godns

A dynamic DNS client tool that supports AliDNS, Cloudflare, Google Domains, DNSPod, HE.net & DuckDNS & DreamHost, etc, written in Go.
https://timothyye.github.io/godns/
Apache License 2.0
1.49k stars 218 forks source link

Add send_from field to notify.mail config #195

Closed sjoegren closed 1 year ago

sjoegren commented 1 year ago

Add new configuration field, notify.mail.send_from, that if set, is used as the "From:" e-mail field. If not set, the behaviour remains the same, that smtp_username is used as "From:" too, to be compatible with previous config files.

This solves the email notification issue where gomail fails to send the email because the smtp_username is not an e-mail address, e.g.:

ERRO[0001] Send notification with error:gomail: could not send email 1: gomail: invalid address "username": mail: missing '@' or angle-addr

TimothyYe commented 1 year ago

Thanks for your contribution.