[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: Re: patch: identity's transport for mailinglist-folders
From: Malte.Starostik () t-online ! de (Malte Starostik)
Date: 2001-06-12 13:38:17
[Download RAW message or body]
On Dienstag, 12. Juni 2001 10:04, Michael Häckel wrote:
> On Tuesday, 12. June 2001 06:13, Malte Starostik wrote:
> > Hi,
> >
> > the attached patch fixes mailing list folders that have an identity with
> > a transport set.
> > Without this, the identity gets selected in the combobox and the
> > signature and headers are set, but the identity's transport is ignored.
> > Any objections or can I commit?
> > PS: Please CC me in replies.
> > -Malte
>
> Well, there were quite a lot fixes in that area recently, but with your
> patch there is at least one new bug:
> If I write a mail with an identity that has a transport defined and then
> manually change the transport, store the message in the drafts folder and
> edit it again, I usually still have to manually changes transport. So far
> corrent.
> But if I manually change the transport to the globally defined transport,
> then the transport is automatically changed to the one defined in the
> identity, if I edit the mail again.
Oh right, does this fix that one? - or does it introduce others?
Hmm, IMHO all of that identity/transport handle would deserve one central
place to avoid such side-effects, but that's definately nothing for the
freeze.
Thing is, I just experienced today what happens if the transport doesn't get
set correctly (default is a local sendmail that forwards to smtp.t-online.de,
which rewrites the envelope sender and From: header) and the identity I
wanted to use goes to smtprelay.t-online.de which leaves them as they are and
just adds an X-Sender header to identify the real origin :)
-Malte
--
Wars don't determine who's right, only who's left.
["kmail.diff" (text/plain)]
Index: kmcomposewin.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmcomposewin.cpp,v
retrieving revision 1.346
diff -u -3 -d -p -r1.346 kmcomposewin.cpp
--- kmcomposewin.cpp 2001/06/11 17:09:22 1.346
+++ kmcomposewin.cpp 2001/06/12 13:34:01
@@ -945,12 +945,11 @@ void KMComposeWin::setMsg(KMMessage* new
mEdtReplyTo.setText(mMsg->replyTo());
mEdtBcc.setText(mMsg->bcc());
- QString identity;
- if (mBtnIdentity.isChecked())
+ QString identity = newMsg->headerField("X-KMail-Identity");
+ if (mBtnIdentity.isChecked() || identity.isEmpty())
identity = mId;
- else
- identity = newMsg->headerField("X-KMail-Identity");
+ QString transport = newMsg->headerField("X-KMail-Transport");
if ( !identity.isEmpty() ) {
mId = identity;
KMIdentity ident( mId );
@@ -958,6 +957,8 @@ void KMComposeWin::setMsg(KMMessage* new
mEdtFrom.setText( ident.fullEmailAddr() );
mEdtReplyTo.setText( ident.replyToAddr() );
+ if ( transport.isEmpty() )
+ transport = ident.transport();
}
for (int i=0; i < mIdentity.count(); ++i)
@@ -966,7 +967,6 @@ void KMComposeWin::setMsg(KMMessage* new
break;
}
- QString transport = newMsg->headerField("X-KMail-Transport");
if (!mBtnTransport.isChecked() && !transport.isEmpty())
mTransport.insertItem( transport, 0 );
@@ -1952,8 +1952,15 @@ void KMComposeWin::doSend(int aSendNow,
// rectify the problem by editing their outgoing preferences and
// resending.
// Hence this following conditional
- if ((mTransport.currentText() != kernel->msgSender()->transportString()) ||
- (!hf.isEmpty() && (hf != kernel->msgSender()->transportString())))
+ QString transport = kernel->msgSender()->transportString();
+ if (mId != i18n("Default") && KMIdentity::identities().contains(mId))
+ {
+ KMIdentity ident(mId);
+ ident.readConfig();
+ transport = ident.transport();
+ }
+ if ((mTransport.currentText() != transport) ||
+ (!hf.isEmpty() && (hf != transport)))
mMsg->setHeaderField("X-KMail-Transport", mTransport.currentText());
disableBreaking = saveInDrafts;
_______________________________________________
Kmail Developers mailing list
Kmail@master.kde.org
http://master.kde.org/mailman/listinfo/kmail
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic