Commit fbb2aa1f authored by David Jarvie's avatar David Jarvie
Browse files

Bug 359163: Use current email address preference setting

If an email alarm was configured to use a KMail sender ID but the
current email sender address preference setting is to use a hard
coded email address, KAlarm still used the KMail sender ID, and
furthermore email sending failed with an error message if the ID
was no longer valid.

This fix makes KAlarm use the current email sender address preference
setting, so that an invalid sender ID only causes an error if the
current setting is to use the KMail sender ID.

BUG: 359163
parent 98c06a67
/*
* kamail.cpp - email functions
* Program: kalarm
* Copyright © 2002-2015 by David Jarvie <djarvie@kde.org>
* Copyright © 2002-2016 by David Jarvie <djarvie@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -107,9 +107,9 @@ int KAMail::send(JobData& jobdata, QStringList& errmsgs)
{
QString err;
KIdentityManagement::Identity identity;
if (!jobdata.event.emailFromId())
jobdata.from = Preferences::emailAddress();
else
jobdata.from = Preferences::emailAddress();
if (jobdata.event.emailFromId()
&& Preferences::emailFrom() == Preferences::MAIL_FROM_KMAIL)
{
identity = Identities::identityManager()->identityForUoid(jobdata.event.emailFromId());
if (identity.isNull())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment