restrict sending EMails to one single to address
Description
Environment
Attachments
relates to
Activity
Thomas Bayen September 3, 2014 at 10:22 PM
After question in chat how this behaves with multi to addresses I tested it and found another issue: In my first implementation I did not expect that iDempiere sets a ReplyTo header of its own. In this case my patch did nothing. But this case seems more common in normal report windows (e.g. via the print button).
The new patch resolves this. It joins the old ReplyTo address and all To addresses (that are not used because of the MAIL_DONT_SEND_TO_ADDRESS system configuration) to a new ReplyTo list. I tested that this works also with many To addresses.
Thomas Bayen August 10, 2014 at 3:21 PM
Please could you review my patch that adds the ReplyTo header?
Thomas Bayen August 10, 2014 at 1:17 PM
This issue was fixed (from Carlos and me) without further notice and documentation to the outside world. I want to add some documentation links here:
https://bitbucket.org/idempiere/idempiere/commits/738b6d7f841b359e91cc4ea6aeef26a4fac64c14 - naturally this code contains - like every good code - the best documentation
http://wiki.idempiere.org/en/System_Configurator_(Window_ID-50006) actual list with the System Configuration items
I wrote a german documentation about this feature at http://wiki.idempiere.org/de/EMail_einrichten
Thomas Bayen August 10, 2014 at 1:12 PM
I tested the functionality and it works well. But there is still an issue imho.
Short: I want to create a ReplyTo header with the original To address.
This functionality can be used in two usecases: 1) debugging and 2) an admin wants to check all mails before they are send automatically (like a gatekeeper).
In both cases it is important to see the original TO address. With the first patch this address is hidden in an "OriginalTo"-Header and can be seen by looking into the message sourcecode. For case 1) (and a low amount of debugging data) this may be suitable but for the case 2) this is quite annoying.
My idea is to set the ReplyTo Header of the mail. At least this is a nice information in the header line that is shown directly by most mail programs. It is easier to copy & past this address to use it as a forward address. And for case 2) it is possible e.g. in Thunderbird to press "Ctrl-E" to "edit this message as new" and just send it (this does not include attachments atm due to another bug).
I understand that the exact meaning of "ReplyTo" does not exactly fit of our case. But as this is a feature mostly used by developers and debuggers I think this is at least a more convenient way to show the recipient than the hidden Header.
Nicolas Micoud July 28, 2014 at 12:06 PM
Very interesting !
Actually, when restoring a database I execute a sql to remove those external email addresses
Perhaps add an option to send emails to a single domain (eg: @tgi.fr, @bayen.de, ...) and not restrict to a single adress only
Regards,
Nicolas
In a development and test environment it is not good to send mails to all customers. The idea to solve that is to allow a system configuration set to send all mails to a single to address.
I found a recent discussion about this topic here https://groups.google.com/forum/#!msg/idempiere/zLcE-KYrGQQ/iboBgRQD7UYJ and some very old idea about it (in german) here http://www.adempiere.metas.de/mediawiki/index.php/E-Mail_Versand_einrichten
There is already a system configuration MAIL_SEND_BCC_TO_ADDRESS to copy mails to one single address. This new issue is about not sending to the original address.
Another use case is that an administrator wants to check the outgoing mails manually. For this it would be good to have the original to address in the mail. Perhaps it works if we use the ReplyTo header for that.