Hello,
Is there currently any way to set the mail headers?
One specific application is to handle bounces.
Currently, the FROM field in the newsletter sent will receive all the bounces from the subscribers' list, which can be a lot. A solution could have been to set the FROM address to a blackhole email that moves all bounces and other incoming messages > /dev/null. But then subscribees cannot reply to the author of the newsletter.
I we can set the mail headers, the FROM can be a real address, that of the newsletter's author/admin, but an additional field in the mail headers would redirect all bounces to another email:
Return-Path: <bounces@example.com>
Once the above is possible, the next (big) step would be a proper handling of bounces: check whatever arrives at the return address, and use cron to automatically (??) unsubscribe all hard bounces.
thank you.
B.
Comments
Comment #1
sstrudeau commentedShort answer: no.
See this node for a quick hack to address this particular issue (return-path header): http://drupal.org/node/36102
I suspect this won't be a feature until Simplenews gets ported to the new mail API for Drupal 5.0, assuming DriesK ever finishes his PhD thesis. :)
I'm particularly interested in this since I'd like to use this module, however I really need bounce management. Right now I'm planning to build a very simple adjunct module to handle bounce management (basically, minimally hack Simplenews to add a return-path and the newsletter ID, and possibly use mimemail to send, and then have a module fetch and record the bounces similar to the enewsletter bounce handler).
Comment #2
markhope commentedCan the returnpath module help with this, or be adapted?
http://drupal.org/project/returnpath
Mark
Comment #3
voidberg commentedSee here for a patch for 4.7: http://drupal.org/node/101428
Comment #4
sutharsan commentedComment #5
broonAfter switching servers and switching from MIME Mail to HTML Mail I ran into a similar problem. The return-path was now always set to the main website address (webmaster@domain.com) instead of the newsletter address (newsletter@domain.com).
One single line changed that (includes/simplenews.source.inc, SimplenewsSourceInterfae::getHeaders(), line 504ff.):
Comment #6
shortspoken commentedThanks @Paul Broon. This helped a lot. Although I had to spell the Return-Path with a capital letter. And you can do the same with the "Sender" header, which was also the site default. So my code looks like this:
Comment #7
Patricia_W commentedWe had a similar problem after upgrading to Drupal 7.50. Eventually we managed to fix it by switching from Mime Mail to HTML Mail.