Backport of:

Improve the sent mail folder logic and the readOnly protection to
first try the folder specified in the mail, then if there was none, or
it's not usable, try the identity one, and if that also fails, the
system one.

svn path=/branches/kdepim/proko2/kdepim/; revision=433147
wilder-work
Till Adam 21 years ago
parent 90e1b93747
commit 26187ecc2e
  1. 16
      kmsender.cpp

@ -290,24 +290,28 @@ void KMSender::doSendMsg()
if ( !mCurrentMsg->fcc().isEmpty() )
{
sentFolder = kmkernel->folderMgr()->findIdString( mCurrentMsg->fcc() );
if ( sentFolder == 0 || sentFolder->isReadOnly() )
if ( sentFolder == 0 )
// This is *NOT* supposed to be imapSentFolder!
sentFolder =
kmkernel->dimapFolderMgr()->findIdString( mCurrentMsg->fcc() );
if ( sentFolder == 0 || sentFolder->isReadOnly() )
if ( sentFolder == 0 )
imapSentFolder =
kmkernel->imapFolderMgr()->findIdString( mCurrentMsg->fcc() );
}
else if ( !id.fcc().isEmpty() )
// No, or no usable sentFolder, and no, or no usable imapSentFolder,
// let's try the on in the identity
if ( ( sentFolder == 0 || sentFolder->isReadOnly() )
&& ( imapSentFolder == 0 || imapSentFolder->isReadOnly() )
&& !id.fcc().isEmpty() )
{
sentFolder = kmkernel->folderMgr()->findIdString( id.fcc() );
if ( sentFolder == 0 || sentFolder->isReadOnly() )
if ( sentFolder == 0 )
// This is *NOT* supposed to be imapSentFolder!
sentFolder = kmkernel->dimapFolderMgr()->findIdString( id.fcc() );
if ( sentFolder == 0 || sentFolder->isReadOnly() )
if ( sentFolder == 0 )
imapSentFolder = kmkernel->imapFolderMgr()->findIdString( id.fcc() );
}
if (imapSentFolder
if (imapSentFolder
&& ( imapSentFolder->noContent() || imapSentFolder->isReadOnly() ) )
imapSentFolder = 0;

Loading…
Cancel
Save