I know that this was part of the 5.x-1.8 release but as of yet has not made
it into the 5.x-2.x-dev releaes. I've looked through the old code and through
posts such as these:

http://drupal.org/node/179151
http://drupal.org/node/223407
http://drupal.org/node/200417
http://drupal.org/node/201085

In the attached patch I've added back in the functionality to send email notifications
with the ability to customize the email subject and body for both a single notification
(immediate delivery) and for digest notification.

Please take a look and try it out. For those that know more about translation and
when and how the hell to use !, %, and @ for placeholders and stuff please provide
feedback as to any changes to make.

Comments

altparty’s picture

Thank you. Works like a charm. This should be a basic feature for this module.

limwork’s picture

Can this patch works in 5.x-3.x? Or is there anyway to get privatemsg email notification through the subscription module?

litwol’s picture

Version: 5.x-2.x-dev » 5.x-3.x-dev

I need some one to try and test this patch if it still works and if it doesnt break anything else. i dont have the time right now to do all the testing so its up to all of you when this patch makes it into this module.

thank you for your help :)

josoal’s picture

It works ok for me in version version: 5.x-3.0
Thanks.

Jason Dean’s picture

Yep I patched my 5.x-3.x-dev and it works perfectly. jaydub you are a star :)

hutch’s picture

This patch is working well for me on 5.x-3.0 and will no doubt work on the current dev as it is the same.

paolomainardi’s picture

I think that this module have some strange objectives, the mail notification is a basic thing for a privatemsg system, but we're passed from 1.8 to 3 (and 2?) without have basic functionality like this (or for example the mass mailing to OG or Roles or Buddylist), ok with the 3.x series, we've the mass mailing to users, but it's really poor.

I'm very disappointed, i think this module have a great potential, but lacks of basic functionality (for this kind of module) and some "linear" objectives.

This patch is good, but don't you think that we can manage better this things with integration with Workflow-ng ?

litwol’s picture

@paolomainardi

Instead if criticizing all the FREE work that people doing for you, why dont you offer them your appreciation and perhaps express your desire for better notification and messaging options in a more constructive manner ? i do advise you to open up a new issue for each of the features you request and feel free to sponsor other developers to submit patch for them.

paolomainardi’s picture

@litwol

Thank you very much for your explanation of "FREE" work.

But, i don't want create a flame or seems to be too much critic, but, i don't understand where this module is gone. I've seen a ton of patch with cool features (like OG integration, mailing out [like this], ecc.) and nothing of this patch is arrived to Privatemsg 3.x, so anyway, i've proposed the integration with Workflow-ng (i don't like the flame..), do you think that can be a good idea ?

I'll start working on this (with OG, Rules, Users, Buddylist mass mailing features)
Cheers

litwol’s picture

I advise contributing such features to version of drupal 6 (currently in HEAD). drupal 5 version only being maintained for bugs and to offer upgrade path to drupal 6.

drupal 6 version have been completely rewritten to use new architecture and eliminate all the inherit bugs form d5.

paolomainardi’s picture

I'm working now on a D5 environment, and i doubt that i can leave for D6 (damn..) and i really need for this functionality (i think that the D5 userbase is also very large), so i'll implement this features for D5, when will be finished i'll submit my patch.

PS: Just out of curiosity, why you have deleted this mailing feature?

litwol’s picture

at the time subscription integration was broken and there were too many bugs with the module. so i eliminated integration with other modules so i could focus on fixing this module's bugs. i'll bring the integration back when people submit patches and others review them (since i dont actualy use this functionality)

paolomainardi’s picture

The better way for me, is the integration with Workflow-ng (or Actions), or simply mailing out with Drupal mail functions (for to deserve too much dependencies).

Thank you very much, for this nice discussion and your time :)

litwol’s picture

I think it is better to stick to basics and to avoid extra module dependencies. however if you still want to use workflow-ng and actions then i advise creating a separate module that creates integration between them all. however i dont guarantee that d6 privatemsg api will support such integration and the whole thing could need a complete rewrite.

if you write the patch for privatemsg only then it could be much easier to port it over to d6.

paolomainardi’s picture

I've created an extension module "privatemsg_ng", now it's possible to:

* Send to OG subscribed (multiple select list or ALL)
* Send to all buddies (multiple select list or ALL)

Todo:

* Send to Role
* File attach
* Workflow-ng integration for mailing out
* Administration settings

Later, i'll attach here the new module.

Paolo

Squirrelly’s picture

Just applied this patch to privatemsg 5.x-3.0 and appears to be working with no errors from initial testing.
Will post here if any future issues do arise.
Thanks very much for the helpful patch, and the module as a whole!

B.P.B’s picture

This patch saved my a$$ ! Auto notify is a critical feature. Users tend not to log in again until they are notified someone messaged them.

Thank you!

andypost’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new9.82 KB

Patch expired so here new one - fixes offsets

debian:~# patch -p0 <privatemsg.module.mailnotify.patch
patching file privatemsg.module
Hunk #4 succeeded at 666 (offset 3 lines).
Hunk #5 succeeded at 1723 (offset -1 lines).
Hunk #6 succeeded at 1742 (offset -1 lines).
Hunk #7 succeeded at 2575 (offset 4 lines).
Hunk #8 succeeded at 2657 with fuzz 1 (offset 4 lines).
dazhdbog’s picture

here's hoping for d6 version patch : )

tborrome’s picture

Had problems patching my 5.3 with the latest patch posted here :
D:\xampp\htdocs\drupal511\sites\all\modules\privatemsg>patch -p0 < privatemsg.module.mailnotify3.patch --verbose --binary
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- privatemsg.module Mon Jun 16 05:52:00 2008 UTC
|+++ privatemsg.module Thu Oct 9 19:06:13 2008 UTC
--------------------------
Patching file privatemsg.module using Plan A...
Hunk #1 FAILED at 5.
Hunk #2 FAILED at 274.
Hunk #3 FAILED at 379.
Hunk #4 FAILED at 666.
Hunk #5 FAILED at 1723.
Hunk #6 FAILED at 1742.
Hunk #7 FAILED at 2575.
Hunk #8 FAILED at 2657.
8 out of 8 hunks FAILED -- saving rejects to file privatemsg.module.rej
done

am i missing anything? i'll try the older patch that others said worked...

tborrome’s picture

cant get either patch to work on windows... tried various combinations of patch-2.5.9. without --binary, this is what i get...

D:\xampp\htdocs\drupal511\sites\all\modules\privatemsg>patch -p0 < privatemsg.module.mailnotify.patch
patching file privatemsg.module
Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

please advise.... thanks.

tborrome’s picture

Man finally got it to work, patching for windows is killing me ... just had to save the patch as windows text file (change from unix format)

The Patch seems to work on privatmsg 5.x-3.0... got the PM's sending out emails. Thanks for this! :)

here's the output:

D:\xampp\htdocs\drupal511\sites\all\modules\privatemsg>patch -p0 < privatemsg.module.mailnotify3.patch --verbose
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- privatemsg.module Mon Jun 16 05:52:00 2008 UTC
|+++ privatemsg.module Thu Oct 9 19:06:13 2008 UTC
--------------------------
Patching file privatemsg.module using Plan A...
Hunk #1 succeeded at 5.
Hunk #2 succeeded at 274.
Hunk #3 succeeded at 379.
Hunk #4 succeeded at 666.
Hunk #5 succeeded at 1723.
Hunk #6 succeeded at 1742.
Hunk #7 succeeded at 2575.
Hunk #8 succeeded at 2657.
done

andypost’s picture

My patch #18 against 5.x-3.x-dev

paolomainardi’s picture

If you don't want touch privatemsg core, try this extension:

http://drupal.org/node/293854

Paolo

rho_’s picture

Patch #18 against 5.x-3.0.

Worked nicely for me, Thank you andypost and jaydub!

Babalu’s picture

please patch against d6 version

litwol’s picture

D6 has a different code base and will have different API. wait for first d6 release, we'll work on notifications then.

bcn’s picture

StatusFileSize
new20.01 KB

just in case anyone needs this, here a copy of the privatemsg.module (version 5.3) with the patch from #18 applied.

gvanhoof’s picture

Hi,

sorry for the dum question - i'm not a developer...

how am i supposed to install the patch? is it just a matter of copying the .patch file #18 in the directory /sites/all/modules/privatemsg?

thanks,

greg

NaX’s picture

#28 Seems to work fine for me.

@gvanhoof use the file from #28 if you are using version 5.3. It has the patch already applied.

gvanhoof’s picture

hi nax,

ok, will use #28.

could you please let me know how to apply a patch though as it seems common practice while using Drupal?

thanks

naheemsays’s picture

dorien’s picture

Version: 5.x-3.x-dev » 6.x-1.0-rc2

I use the 6 rc2 version. But I don't see any email notification feature. Am I overlooking it? In which version do you think it will be implemented.
Many many thanks!!

litwol’s picture

Version: 6.x-1.0-rc2 » 5.x-3.x-dev

This patch is for 5.3-dev _only_.

drupal 6 version is a complete rewrite and this patch does not apply to it. d6 message notifications is a new feature request that will need to be implemented at a later time.

dorien’s picture

Thanks for your answer :-) And thanks a lot for this great module.

Jim Ruby’s picture

Hi, just upgraded a d5 to d6. sure hope the d6 will soon have the ability to notify users via email of messages and be able to send attachments. Thanks for the time and work you put in to this module. It is appreciated. One other suggestion. You can get a list of users via the user menu. what is the chances of an option to list the users in a drop down or check box so one can choose them this way. jwould be ok for a small to medium sight,

Thanks for your time.

Sophia’s picture

Subscribing. This is one great module, thanks :) I too use use the D6 version.

digidoo’s picture

me too, subscribing.

lainel’s picture

Where do I insert the code? I new to this patching thing.

naheemsays’s picture

alexfisher’s picture

This was very helpful-- thanks noahb!

bflora’s picture

Noahb's file worked like a charm! Holy cow. I can't believe this is actually possible now. Finally!

n0mad’s picture

n0 luck this end with the patch, following error;

=========================================================================================
Fatal error: Call to undefined function _actions_get_hook_aids() in /modules/privatemsg/privatemsg.module on line 2669
=========================================================================================

Upon inspection Line 2669 = switch ($op) {

Any help would be appreciated

n0mad

lainel’s picture

Which verson of Private messanger are you using?

n0mad’s picture

Status: Reviewed & tested by the community » Needs work

We are using Private Messanger 5.x-3.0

no luck with this patch, Any help would be appreciated

n0mad

lainel’s picture

StatusFileSize
new20.01 KB

Try using this, it has the patch on it. Just remove your current privatemsg module folder, and replace it with this one.

File attached.

litwol’s picture

Please backup your old privatemsg folder before removal.

n0mad’s picture

Status: Needs work » Fixed

Thankyou Lainel your file worked perfectly, not shaw what I missed but we are pleased to note we can now
receive email notification of PM's from our site like the earlier days :P

Thankyou again for your support.......

n0mad

melezhik’s picture

noahb Thanks You A Lot!!!

Your patched module is the great thing

It began work just after file copying!!!

Thank you all guys for solving such nessesary for PrivateMsg problem!!!

andypost’s picture

Status: Fixed » Needs work

So why not include this feature info 5.x version? 3.1 for example

A lot of people (1500 for now) still use d5

Make active because last .zip are too old from current-5 state

litwol’s picture

Status: Needs work » Closed (won't fix)

passive aggressive encouragement to move to d6.

andypost’s picture

Status: Closed (won't fix) » Postponed

Please, leave this postponed not all can move to d6

PM for d6 is very different from 5 but all of them need support and attention - let the community to sovle this issue

webalchemist’s picture

Thank you so much for this amazing little zip! I replaced my module file and it worked like a champ! Yahoo!!!

plan9’s picture

Thanks noahb!

It's good to see D5 still being supported here - it feels pretty lonely on most module issue queues - being in the D5 minority (!)

G

mcurry’s picture

subscribe

tobias’s picture

+1 subscribing.

berdir’s picture

Status: Postponed » Closed (won't fix)

I'm closing old issues since Privatemsg for Drupal 5 is not maintained anymore. I suggest you switch to Drupal 6 if possible, many of the reported issues are probably already resolved there and if not, you're welcome to open a new issue.