I'm sure this has been thought of before, but maybe not. It's not in the feature request list I can see.

It would be nice to have CC/BCC fields. I guess this implies one would also need to have a 'Reply All' option instead of the simple reply.

Thx

CommentFileSizeAuthor
#5 add-bcc-field.patch1.87 KBfindmashmind

Comments

raintonr’s picture

Looks like this is partly solved with #135540: Multiple recipients

litwol’s picture

Version: 5.x-1.8 »
Status: Active » Needs work

1.8 is no longer maintained. i advise upgrade to 3.0

also this feature will not be backported to d5 after i build it into d6 because i no longer develop features for d5 unless some one contributes a patch.

findmashmind’s picture

Version: » 6.x-1.2
Issue tags: ++patch
StatusFileSize
new1.87 KB

Added BCC field here admin/settings/messages/notify. When this field has a email address , Message copy will be send to this address as well. This patch works for drupal 6.x-1.x.

berdir’s picture

Version: 6.x-1.2 » 6.x-2.x-dev
Status: Needs work » Active

Note that no new features will be added to the 6.x-2.x branch.

Also remember to set the state to needs review when you post a patch, this will trigger the testbot which will try out your patch.

Also:

1. This is not what this issue was about. Your patch is an extension to the notification system, this is about cc/bcc *within* private messages.

2. This should be easily possible using rules IMHO.

Nevertheless, below is a quick review of your code:

+++ b/pm_email_notify/pm_email_notify.info
@@ -4,3 +4,10 @@ package = Mail
+
+; Information added by drupal.org packaging script on 2011-06-19
+version = "6.x-1.5"
+core = "6.x"
+project = "privatemsg"
+datestamp = "1308483720"
+

This must not be added as it is done automatically by the package, adding it manually would duplicate it.

+++ b/pm_email_notify/pm_email_notify.module
@@ -51,6 +51,13 @@ function pm_email_notify_admin_settings_form() {
+ $form['pm_email']['pm_email_notify_bcc'] = array(
+    '#type' => 'textfield',
+    '#title' => t('BCC'),
+    '#default_value' => variable_get('pm_email_notify_bcc', 'mashtharufit@gmail.com'),
+    '#weight' => 2,
+  );

You really don't want to put your own personal mail address in the default value :)

+++ b/pm_email_notify/pm_email_notify.module
@@ -87,6 +94,7 @@ function _pm_email_notify_is_enabled($uid) {
 function pm_email_notify_privatemsg_message_insert($message) {
+	
   foreach ($message['recipients'] as $recipient) {

Unecessary trainling spaces here.

+++ b/pm_email_notify/pm_email_notify.module
@@ -96,6 +104,11 @@ function pm_email_notify_privatemsg_message_insert($message) {
+  $mail_user_bcc = variable_get('pm_email_notify_bcc',true);
+  $user_admin_b = user_load(1);
+  if(!empty($mail_user_bcc)){
+    drupal_mail('pm_email_notify', 'notice', $mail_user_bcc, user_preferred_language($user_admin_b), $params);
+  }

It would probably make sense to look up the users which with the provided mail address instead of using uid 1.

findmashmind’s picture

thanks for pointed out things. I added this changes to one of my project and I uploaded it hear as well. That's why i have used my email. i forgot to change that.

Any way if rules IMHO is easiest i will check that.

Thanks.

ptmkenny’s picture

Marked http://drupal.org/node/1912682 as a duplicate

ptmkenny’s picture

Status: Active » Fixed

As noted in #6, this kind of functionality can be implemented in Rules, so I'm closing this issue.

Status: Fixed » Closed (fixed)
Issue tags: -+patch

Automatically closed -- issue fixed for 2 weeks with no activity.

loze’s picture

Can someone point me towards an example of how to do this with vbo and rules.

I am able to create an action that can send a PM to selected users, but I am unable to expose the message fields in rules to the sending user.

can rules expose these fields for user input?

thanks.