thp / urlwatch

Watch (parts of) webpages and get notified when something changes via e-mail, on your phone or via other means. Highly configurable.
https://thp.io/2008/urlwatch/
Other
2.82k stars 351 forks source link

Adds optional reply_to email reporter config option #794

Closed trevorshannon closed 7 months ago

trevorshannon commented 8 months ago

It can sometimes be useful to have a reply-to address different from the from address, especially when sending automated emails such as those generated by urlwatch. If email reports are being sent to a distribution list, a reply-to address of that list makes more sense than the (likely unmonitored) bot address.

This PR adds the reply_to config option for the email reporter. Note that the Reply-To header will now always be added to outgoing emails, but if the reply_to option is missing, that header will simply be populated with the same value as From

Jamstah commented 8 months ago

You should also update the CHANGELOG.md.

trevorshannon commented 8 months ago

oops, thanks I always forget that.

trevorshannon commented 7 months ago

Thanks for the comments. I agree that adding the Reply-To header only if a user makes use of the reply_to param is safer because the currently released behavior will be completely unchanged when reply_to is unused.

I think that if the user enters in the same address for from and reply_to, that's still perfectly valid and we should add the Reply-To header to the email in that case (even though it should not make any difference to an email client's reply behavior). If you feel strongly that there should be an equality check between from and reply_to then I can add it.

I took care of the change log and the default email config.