Bug 218986 - using multiple sending accounts the default outgoing transport is always used
Summary: using multiple sending accounts the default outgoing transport is always used
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail
Classification: Applications
Component: composer (show other bugs)
Version: unspecified
Platform: Slackware Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 233032 240065 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-12-16 22:08 UTC by heavytull
Modified: 2016-03-23 09:31 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description heavytull 2009-12-16 22:08:57 UTC
Version:            (using KDE 4.2.4)
OS:                Linux
Installed from:    Slackware Packages

when using kmail with more than one pop/imap/smtp account, it is always sending emails through the same account, even when the email is sent 'via xxx'.
In my case I have one gmail pop account and an imap account from another service provider. Both smtp accounts have been set in kmail. The gmail one is set as the default one. When I send emails, they're all sent through the gmail account. But when I try to sent an email through the other one then it is sent again through the gmail account.
Comment 1 Björn Ruberg 2010-03-10 00:29:43 UTC
Are you sure you are using this correctly? For using different transports you have to hold the mouse pressed on the "Send" button - and you can define default transports in the identity settings.
Comment 2 heavytull 2010-03-23 21:43:38 UTC
(In reply to comment #1)
> Are you sure you are using this correctly? For using different transports you
> have to hold the mouse pressed on the "Send" button - and you can define
> default transports in the identity settings.

yeah I'm sure I'm using this correctly. In the Original report i said I was sending 'via xxx'. This is the option in the file menu and is equivalent to sending by holding down the mouse on the 'send' button and choosing one of the accounts appearing.
Comment 3 Björn Ruberg 2010-03-24 11:08:14 UTC
Cannot reproduce. For me this works even when used from the file menu. Please go your inbox, right-click on it, go to properties and see whether you have selected your google account as default identity there
Comment 4 Björn Ruberg 2010-04-02 11:42:49 UTC
*** Bug 233032 has been marked as a duplicate of this bug. ***
Comment 5 heavytull 2010-05-14 09:41:08 UTC
I finally found a workaround. I created a second identity in which I set the email address corresponding to the account kmail was failing to send emails through. So when sending emails I select this new identity and I send 'via xxx'. But the email locally appears in the other account's 'sent' folder and doesn't appear in any of the 'sent' folder on the actual webmail service on Internet (e.i. www.gmail.com and www.yahoo.com).
Comment 6 Björn Ruberg 2010-08-08 16:52:26 UTC
*** Bug 240065 has been marked as a duplicate of this bug. ***
Comment 7 marcello 2010-08-08 17:09:44 UTC
i confirm this issue. 

i cannot resolve it even with a second identity (using also special transport option)...
Comment 8 heavytull 2012-01-16 12:22:15 UTC
Will this annoying bug be solved some day?
Comment 9 marcello 2012-02-22 15:04:50 UTC
maybe only 20 votes aren't enough to consider this bug and fixing it...
Comment 10 riaasm 2012-10-15 08:55:45 UTC
Using Kontact 4.4.11 with KMail 1.13.7 with KDE 4.8.4 on Debian unstable. 

I thought I had this bug too, but that does not appear to be the case after all. However, there are some confusing things in KMail which I suspect are making it seem like this bug is present. Note that I could send my mail from the correct address when holding the Send button and selecting the correct SMTP account, even when using the same identity.

There are two confusing things here that make it seem like this is not working correctly:
1. The sent mail is stored in a sent-mail folder which is defined in the identity settings. This means that the same folder will be used for all sent mail, regardless of which SMTP account is used. It might be more useful to copy this setting to the SMTP account's settings so it can be different for each account (using the identity's setting as fallback option). This assumes that identities are used to represent people, who can have different accounts which are shown separately. 

2. Perhaps this is the more likely culprit for making it seem like this bug is present. When you view the sent mails in KMail, it always displays the identity in the "From" field, with the email address filled in in the identity's settings. However, if you view the source email you'll see the header parameter X-KMail-Transport which does show which SMTP account was used. It would be less confusing if the "From" field showed the identity's name but with the SMTP account name (which would be the same as the X-KMail-Transport value) after it instead of the standard email address. Ideally, you'd want it to show the email address corresponding with that SMTP account, if possible. 

Aside from removing false positive reproduction of this bug, changing this behaviour would also improve usability quite a bit.
Comment 11 Laurent Montel 2015-04-12 10:15:32 UTC
Thank you for taking the time to file a bug report.

KMail2 was released in 2011, and the entire code base went through significant changes. We are currently in the process of porting to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2.

We welcome you to try out KMail 2 with the KDE 4.14 release and give your feedback.
Comment 12 riaasm 2016-03-23 09:31:54 UTC
Using Kontact 4.14.2, I could configure this to always work correctly. Like I mentioned before, the settings are a bit confusing but if you configure them correctly, you can have your mails sent automatically through the correct account. 

If you want you email addresses to be retrieved and sent separately in KMail, you will need the following for each email address:
1. An Identity for that email address (e.g. John Doe)
2. A receiving Account for that email address (e.g. IMAP/POP3/etc.)
3. A sending Account for that email address (e.g. SMTP)

You then need to configure them as follows:
1. In the Identity's settings, you need to configure 2 things (on the Advanced tab):
a. Configure the sent-mail folder to the Sent folder in your account
b. Fill in the Outgoing Account of the Identity to the sending Account (SMTP server) for that email address
2. In the receiving Account's settings, you need to configure the correct Identity to use for that email address

The effects of these settings are as follows:
1a. Causes your sent mail to be stored in the Sent folder on the email server and therefore also shown under that account (and not in the Local Folders)
1b. Causes the mail that is configured for a specific Identity to be sent with that specific sending Account (SMTP server)
2. Causes mails created from a specific Account (e.g. replies to a mail from that Account) to automatically use that Identity. This fills in the Identity on that mail, which also fills in the "From:" field on the mail, but without configuring 1b it will still send mails with the default sending Account (SMTP server). 

Configuration step 1b was the last part that was missing since the last time I tried this. Now it works correctly every time.