RoundCube Webmail Forum  

Go Back   RoundCube Webmail Forum > Third Party Contributions > Plug-Ins

For more information about the ads and why they're here, please see the FAQ
Reply
  #1  
Old 10-10-2006, 05:41 PM
Registered User
 
Join Date: Oct 2006
Posts: 5
Downloads: 0
Uploads: 0
Default Email Notification

Hi All,
I have added 2 lines of code for manage the Email Notification when required...

go to program/steps/mail/show.inc

search:
Code:
// mark message as read
 if (!$MESSAGE['headers']->seen)
  $IMAP->set_flag($_GET['_uid'], 'SEEN');
should be at line 59
change to:
Code:
// mark message as read
 if (!$MESSAGE['headers']->seen)
 {
  $IMAP->set_flag($_GET['_uid'], 'SEEN');
  //notifica di lettura
  if ($MESSAGE['structure']->headers['disposition-notification-to'] != '') 
  {
   mail($MESSAGE['structure']->headers['disposition-notification-to'], "Letto: ".$MESSAGE['structure']->headers['subject'], "Conferma messaggio inviato a\n".$MESSAGE['structure']->headers['to']." alle ".$MESSAGE['structure']->headers['date']."\n\nIl messaggio è stato visualizzato nel computer del destinatario alle ".date('r',time()), "From: ".$MESSAGE['structure']->headers['to']);
   show_message($CONFIG['product_name']." ha inviato la <i>Notifica di Lettura</i> al Mittente.");
  } 
 }
that's all...

Enjoy!
Fabio
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 10-11-2006, 09:51 AM
Registered User
 
Join Date: Aug 2006
Posts: 31
Downloads: 0
Uploads: 0
Default Re: Email Notification

Ciao?

That is a cool hack. Thank you!

Can you please translate the italiano in english, because my italiano isn't very well?

greetz, Nico
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 10-11-2006, 10:40 AM
Registered User
 
Join Date: Oct 2006
Posts: 5
Downloads: 0
Uploads: 0
Default Re: Email Notification

yes... but check my bad english!
Code:
// mark message as read
 if (!$MESSAGE['headers']->seen)
 {
  $IMAP->set_flag($_GET['_uid'], 'SEEN');
  //notifica di lettura
  if ($MESSAGE['structure']->headers['disposition-notification-to'] != '') 
  {
   mail($MESSAGE['structure']->headers['disposition-notification-to'], "Read: ".$MESSAGE['structure']->headers['subject'], "Message confirmation sent to\n".$MESSAGE['structure']->headers['to']." at ".$MESSAGE['structure']->headers['date']."\n\nThe message has been shown on the addressee's computer at ".date('r',time()), "From: ".$MESSAGE['structure']->headers['to']);
   show_message($CONFIG['product_name']." sent the <i>Read Notification</i> to the Addressee.");
  } 
 }
ciao!
Fabio

[admin]Updated English

FYI: Not a whole lot wrong. Just changed "Show" to "Shown"[/admin]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 12-30-2006, 06:56 PM
Registered User
 
Join Date: Oct 2006
Posts: 84
Downloads: 0
Uploads: 0
Default Re: Email Notification


Poanza. I think this is great, but we need to add some functionality I think to make it even better.
[list][*]We should add a global variable to set / unset / warn (popup asking per e-mail)[*]I had a look at the code and I could not find the disposition-notification-to header in the headers of the e-mail -> used print_r($MESSAGE['structure'])
  • A broader check should be done to find out who to reply to as 1. notification to, 2. reply-to and then 3. the sender

Does anyone know how to correctly capture the disposition-notification-to header? (maybe I did something wrong, but could not access this var)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 10-26-2007, 10:58 AM
Registered User
 
Join Date: Oct 2007
Posts: 3
Downloads: 0
Uploads: 0
Default Re: Email Notification

Updated version for RC2 (changes are only on the second and the fourth lines) with french language

Code:
 // mark message as read
 if (!$MESSAGE['headers']->seen && $_action != 'preview')
 {
  $IMAP->set_flag($MESSAGE['UID'], 'SEEN');
  // Accusé de réception
  if ($MESSAGE['structure']->headers['disposition-notification-to'] != '')
  {
   mail($MESSAGE['structure']->headers['disposition-notification-to'], "Lu: ".$MESSAGE['structure']->headers['subject'], "Accus&eacute; de r&eacute;ception
envoy&eacute; &agrave;\n".$MESSAGE['structure']->headers['to']." &agrave; ".$MESSAGE['structure']->headers['date']."\n\nLe message a &eacute;t&eacute; re&ced
il;u par le destinataire &agrave; ".date('r',time()), "From: ".$MESSAGE['structure']->headers['to']);
   show_message($CONFIG['product_name']." a envoy&eacute; l'<i>accus&eacute; de r&eacute;ception</i> &agrave; l'exp&eacute;diteur.");
  }
 }
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 11-02-2007, 12:13 AM
Registered User
 
Join Date: Nov 2006
Posts: 21
Downloads: 0
Uploads: 0
Default Re: Email Notification

So, what kind of notification does this mod do? is it a like a pop-up "you've got mail" ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

For more information about the ads and why they're here, please see the FAQ

All times are GMT. The time now is 07:22 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright © 2006-2008 RoundCube Webmail Community