Posted by kylehase on May 30, 2006 at 4:40am
7 followers
| Project: | Guestbook |
| Version: | 6.x-1.1 |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | hba |
| Status: | active |
Issue Summary
My users are requesting an email notification when a new guestbook message is posted. I tried to do this with the action module but have been unsuccessful so far.
Comments
#1
Find this line in code:
// Insert new message
Then put this in front of it:
<?php// Send Email notification message
$guestbook_owner = user_load(array('uid' => $uid));
$to = $guestbook_owner->mail;
$from = variable_get('site_mail', ini_get('sendmail_from'));
$site_name = variable_get("site_name", "Drupal");
$headers = "From: $from\nReply-to: $user->mail\nX-Mailer: Drupal\nReturn-path: \nErrors-to: $from\n";
user_mail($to, "[".$site_name."] New guestbook entry", "Your guestbook has just been signed by '" .$user->name. "'\n\nThis guestbook listed message below will show up on your profile home page:\n\n". $message, $headers);
?>
works for 4.7...
good luck!
Albert
www.ithou.org/Esalen
#2
I had a client that also requested this feature. I've implemented a more complete solution, available as an add-on module. I hope it can be included in the main line code after review, but for now, you can just drop this module into your modules directory and go with it.
Enjoy,
-Mark
#3
Thanks for the submitted code. I'll review it (and possibly include it into the guestbook) as soon as I have some spare time.
#4
Thanks mfredrickson for the module, it is very useful! I added a couple lines so that messaging is enabled by default for all users, perhaps if this feature makes it into the guestbook module there could be an option under the admin settings to make it enabled by default for all users?
Here's hoping this makes it into the main module. hba, I'd be willing to help in any way (rolling a patch perhaps) if needed.
Thanks!
#5
E-mail notifications are included in 5.x.
#6
#7
i'm using guestbook 6.x-1.1 and i receive notification emails, but these emails only show the content of the entry.
i'd like to customize it to send the user only a message "new message for you, click here to see it".
how can I arrive there?
#8
There are several questions about this issue. If you want to close it, could some one please explain
what is so diffcult to add the senders name on line?
$message['subject'] = t('New guestbook entry at !site', $variables, $language->language);
if we can some how pass the user->name to this subject , that should solve the problem