diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php
index 18797312ad8..5ff544a1f6c 100644
--- a/htdocs/admin/agenda_other.php
+++ b/htdocs/admin/agenda_other.php
@@ -87,6 +87,7 @@ if ($action == 'set') {
dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_TYPE', $defaultfilter, 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_STATUS', GETPOST('AGENDA_DEFAULT_FILTER_STATUS'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, 'AGENDA_DEFAULT_VIEW', GETPOST('AGENDA_DEFAULT_VIEW'), 'chaine', 0, '', $conf->entity);
+ dolibarr_set_const($db, "COMM_ACTION_MAIL_DESCRIPTION", GETPOST("COMM_ACTION_MAIL_DESCRIPTION", 'int'), 'chaine', 0, '', $conf->entity);
$defaultValues = new DefaultValues($db);
$result = $defaultValues->fetchAll('', '', 0, 0, array('t.page'=>'comm/action/card.php', 't.param'=>'complete', 't.user_id'=>'0', 't.type'=>'createform', 't.entity'=>$conf->entity));
@@ -398,6 +399,14 @@ print '
'."\n";
$formactions->form_select_status_action('agenda', getDolGlobalString('AGENDA_DEFAULT_FILTER_STATUS'), 1, 'AGENDA_DEFAULT_FILTER_STATUS', 1, 2, 'minwidth100');
print ' | '."\n";
+//comm action show in description the mail information
+print ''."\n";
+print '| '.$langs->trans("COMM_ACTION_MAIL_DESCRIPTION").' | '."\n";
+print ' | '."\n";
+print ''."\n";
+print $form->selectyesno('COMM_ACTION_MAIL_DESCRIPTION', getDolGlobalString('COMM_ACTION_MAIL_DESCRIPTION'), 1);
+print ' |
';
+
print '';
print $form->buttonsSaveCancel("Save", '');
diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php
index a36f944d6c5..b5a62c7480e 100644
--- a/htdocs/comm/action/card.php
+++ b/htdocs/comm/action/card.php
@@ -2403,6 +2403,20 @@ if ($id > 0) {
print '';
}
+ //mail information
+ if (!empty($object->email_msgid) && $conf->global->COMM_ACTION_MAIL_DESCRIPTION) {
+ print '| '.$langs->trans('MailTopic').' | ';
+ print ''.dol_escape_htmltag($object->email_subject).' |
';
+ print '| '.$langs->trans('MailFrom').' | ';
+ print ''.dol_escape_htmltag($object->email_from).' |
';
+ print '| '.$langs->trans('MailTo').' | ';
+ print ''.dol_escape_htmltag($object->email_to).' |
';
+ if (!empty($object->email_tocc)) {
+ print '| '.$langs->trans('MailCC').' | ';
+ print ''.dol_escape_htmltag($object->email_tocc).' |
';
+ }
+ }
+
// Description
print '| '.$langs->trans("Description").' | ';
print dol_string_onlythesehtmltags(dol_htmlentitiesbr($object->note_private));
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 2ef2a996f3b..1a72704a2af 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -313,6 +313,7 @@ MAIN_DISABLE_ALL_SMS=Disable all SMS sending (for test purposes or demos)
MAIN_SMS_SENDMODE=Method to use to send SMS
MAIN_MAIL_SMS_FROM=Default sender phone number for SMS sending
MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email or Company email)
+COMM_ACTION_MAIL_DESCRIPTION=Show the email information (sender, receivers, etc) in the event description (if defined)
UserEmail=User email
CompanyEmail=Company Email
FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally.
|