Allow user to not receive BCC of their mails

Description

Some users don't like to receive a copy of their mail send from adempiere.
AFAIK, by now, you can just define this parameter for a whole client.
This could be useful to add a checkbox "Don't want to receive BCC of my emails" on AD_User.

If this new checkbox is unticked and if SysConfig.MAIL_SEND_BCC_TO_FROM = Y, then we can call addBcc(newFrom).
If this new checkbox is ticked, we only send mail to recipient.

WDYT ?

Environment

None

Attachments

1

Activity

Show:

Carlos Ruiz July 11, 2018 at 1:03 PM

The sysconfig key MAIL_SEND_BCC_TO_FROM was intended mostly for gmail server which don't get mail in your inbox when sent from iDempiere.

Now, rethinking this - that flag sounds more like a company decision instead of a user decision - in order to have local copies of the sent emails.

Regards,

Carlos Ruiz

Carlos Ruiz April 15, 2015 at 9:18 PM

this seems like another good candidate for the user preferences

Nicolas Micoud June 7, 2012 at 7:11 PM

Here what i would do :

Database :
Add 'IsMailSendBccToSender' column to AD_User (default Y)
Name/PrintName = 'Get BCC of sent mails'
Description = 'If your administrator authorize it, you could receive your outgoing mails in BCC'

Java :
EMail.setFrom(String newFrom)

if (MSysConfig.getBooleanValue("MAIL_SEND_BCC_TO_FROM", false, Env.getAD_Client_ID(Env.getCtx())));
addBcc(newFrom);

become :

if (MSysConfig.getBooleanValue("MAIL_SEND_BCC_TO_FROM", false, Env.getAD_Client_ID(Env.getCtx()))
&& (MUser.get(m_ctx).isMailSendBcc()));
addBcc(newFrom);

So, the new logic would be :

  • If SysConfig = N > mails never send BCC

  • If SysConfig = Y

    • if user.IsMailSendBccToSender = Y > mails send in BCC

    • if user.IsMailSendBccToSender = N > mails not send in BCC

I would appreciate a review before creating official ID

Regards,

Nicolas

Won't Fix

Details

Assignee

Reporter

Labels

Components

Priority

Created May 4, 2012 at 5:05 PM
Updated September 1, 2018 at 11:01 AM
Resolved July 11, 2018 at 1:03 PM