Here it is ladies and gentlemen, what you've all been waiting for: now, when your users are sent a prvitmsg they are notified by email immediately of their waiting message. Though this is a first release, this script has been tested and is running on my site right now.
I have two modules written for Drupal, in Coldfusion both live:
1) Filterable user directory
2) Notification of privatemsg
Install notes:
Call this with CFSchedule, interval= 300 or whatever you'd like
Add a field to your privatemsg db called "remind" varchar 10, set default value to 0
ver. 1.0
Drupal/Coldfusion hosting provided by: http://www.hostnexus.com/
select id
FROM privatemsg
where newmsg = 1
and remind = 0
select *
FROM privatemsg
where id = #i#
select *
FROM users
where uid = '#getmail.recipient#'
select *
FROM users
where uid = '#getmail.author#'
author error
cc = ""
bcc = ""
to = "#getyou.mail#"
from = "A New Message "
subject = "New personal message from #getauthor.name# at companyname"
username= ""
password= ""
server= "mail.domain.com">
Hi #getyou.name#
You've got a new message from #getauthor.name# on domain.com!
You have a new message: #getmail.subject#
Click here to read your message:
http://domain.com/privatemsg/view/#i#
Click here to invite a friend to join:
http://domain.com/invite/
-------------------------
We have sent you this notification to facilitate your use as a member of the domain.com service.
Copyright, 2006 domain.com. All Rights Reserved.
UPDATE privatemsg
SET remind = "1"
where id = '#i#'
update ok - #i#