Re: PATCH: Allow use of an IMAP mailbox as Sentbox



This patch is not a complete solution. It assumes that the user has
already authenticated against the IMAP server which is true most of the
time but not always. The sent mail would silently dropped if the
ImapUser and ImapPass/ImapCRAM variables are not set to correct values.

/Pawel

On 2001-07-10 04:20 Manuel McLure wrote:
> *** libbalsa/send.c.orig	Mon Jul  9 00:35:31 2001
> --- libbalsa/send.c	Mon Jul  9 18:57:08 2001
> ***************
> *** 225,230 ****
> --- 225,233 ----
>   		       LibBalsaMailbox * fccbox, gint encoding)
>   {
>       MessageQueueItem *mqi;
> +     LibBalsaMailboxImap *imapfccbox;
> +     char imappath[_POSIX_PATH_MAX];
> + 
>   
>       g_return_if_fail(message);
>   
> ***************
> *** 236,245 ****
>   	mutt_write_fcc(LIBBALSA_MAILBOX_LOCAL(outbox)->path,
>   		       mqi->message, NULL, 0, NULL);
>   	libbalsa_unlock_mutt();
> ! 	if (fccbox && LIBBALSA_IS_MAILBOX_LOCAL(fccbox)) {
>   	    libbalsa_lock_mutt();
> ! 	    mutt_write_fcc(LIBBALSA_MAILBOX_LOCAL(fccbox)->path,
>   			   mqi->message, NULL, 0, NULL);
>   	    libbalsa_unlock_mutt();
>   	    libbalsa_mailbox_check(fccbox);
>   	}
> --- 239,259 ----
>   	mutt_write_fcc(LIBBALSA_MAILBOX_LOCAL(outbox)->path,
>   		       mqi->message, NULL, 0, NULL);
>   	libbalsa_unlock_mutt();
> ! 	if (fccbox && (LIBBALSA_IS_MAILBOX_LOCAL(fccbox)
> ! 		|| LIBBALSA_IS_MAILBOX_IMAP(fccbox))) {
>   	    libbalsa_lock_mutt();
> ! 	    if (LIBBALSA_IS_MAILBOX_LOCAL(fccbox)) {
> ! 		mutt_write_fcc(LIBBALSA_MAILBOX_LOCAL(fccbox)->path,
> ! 			   mqi->message, NULL, 0, NULL);
> ! 	    } else if (LIBBALSA_IS_MAILBOX_IMAP(fccbox)) {
> ! 		imapfccbox = LIBBALSA_MAILBOX_IMAP(fccbox);
> ! 		snprintf(imappath, _POSIX_PATH_MAX, "{%s:%d}%s",
> ! 		    imapfccbox->mailbox.server->host,
> ! 		    imapfccbox->mailbox.server->port,
> ! 		    imapfccbox->path);
> ! 		mutt_write_fcc(imappath,
>   			   mqi->message, NULL, 0, NULL);
> + 	    }
>   	    libbalsa_unlock_mutt();
>   	    libbalsa_mailbox_check(fccbox);
>   	}
> 
> 
> 
> -- 
> Manuel A. McLure KE6TAW | ...for in Ulthar, according to an ancient
> <manuel@mclure.org>     | and significant law, no man may kill a cat.
> <http://www.mclure.org> |             -- H.P. Lovecraft
> 
> _______________________________________________
> balsa-list mailing list
> balsa-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/balsa-list
> 
-- 
Pawel Salek (pawsa@theochem.kth.se) http://www.theochem.kth.se/~pawsa/
Theoretical Chemistry Division, KTH voice: +46 8 790-8202




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]