jeremyevans / rodauth

Ruby's Most Advanced Authentication Framework
http://rodauth.jeremyevans.net
MIT License
1.69k stars 95 forks source link

Auto-Submitted: auto-generated email header #175

Closed plujon closed 3 years ago

plujon commented 3 years ago

I believe few people have ever heard of Auto-Submitted: auto-generated, but I think its widespread adoption might be beneficial to the email ecosystem. Personally, I wish the automated emails I received contained this header.

I don't see how to configure rodauth to include this email header, and I'd like to add it to all rodauth generated emails. Is there a recommended way to do this? Override send_email and call super?

I'm happy to be a guinea pig to enable the header and report whether it makes any noticeable difference in spam filtering.

jeremyevans commented 3 years ago

Correct, something like the following in your Rodauth configuration:

  send_email do |email|
    email.header['Auto-Submitted'] = 'auto-generated'
    super(email)
  end

In the future, as specified in the contribution guidelines, please ask questions like this on the Google Group. GitHub Issues should only be used for reporting bugs in Rodauth.