[RCD] Enigma plugin

A.L.E.C alec at alec.pl
Tue Aug 28 13:54:04 CEST 2012


On 08/28/2012 01:35 PM, Szuts Attila wrote:
> 
> When I call 'message_outgoing_complete' hook it returns an encrypted (by
> RECIPIENT public key) $MAIL_MIME instance.
> After that I want to store ('_store_target') the message in Sent Items
> folder (or Draft or what user wants), encrypted by SENDER public key.
> 
> I think hook could return 2 Mail_Mime instance: one for sending
> (rcmail_deliver_message()) and one for later storing
> ($IMAP->save_message()).
> Is there any best practice?

I think, we could extend message_sent hook (rcmail.php). This is not
executed on draft saving, but you can detect what is the current action
by checking $_POST['_draft']. Then in save-draft-request use
message_outgoing_complete else use both message_outgoing_complete and
message_sent.

-- 
Aleksander 'A.L.E.C' Machniak
LAN Management System Developer [http://lms.org.pl]
Roundcube Webmail Developer  [http://roundcube.net]
---------------------------------------------------
PGP: 19359DC1 @@ GG: 2275252 @@ WWW: http://alec.pl


More information about the dev mailing list