Hi All,
I have added 2 lines of code for manage the Email Notification when required...
go to program/steps/mail/show.inc
search:
// mark message as read
if (!$MESSAGE['headers']->seen)
$IMAP->set_flag($_GET['_uid'], 'SEEN');
should be at line 59
change to:
// 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 Notifica di Lettura al Mittente.");
}
}
that's all... ;D
Enjoy!
Fabio
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
yes... but check my bad english! :D
// 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]
Poanza. I think this is great, but we need to add some functionality I think to make it even better.
- 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)
Updated version for RC2 (changes are only on the second and the fourth lines) with french language
// 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é de réception
envoyé à\n".$MESSAGE['structure']->headers['to']." à ".$MESSAGE['structure']->headers['date']."\n\nLe message a été re&ced
il;u par le destinataire à ".date('r',time()), "From: ".$MESSAGE['structure']->headers['to']);
show_message($CONFIG['product_name']." a envoyé l'<i>accusé de réception</i> à l'expéditeur.");
}
}
So, what kind of notification does this mod do? is it a like a pop-up "you've got mail" ?
I'm glad this thread is made where I can gain a lot of useful and informative input.
comparatif simulation assurance vie multisupport (http://simulationassurancevie.com/) - simulation assurance vie ! Les sites de simulation assurance viecomparatif simulation assurance vie multisupport (http://simulationassurancevie.com/)