MailTransport
smtpjob.cpp
47 QObject::connect(session, &KSmtp::Session::stateChanged, [session](KSmtp::Session::State state) {
99 qCDebug(MAILTRANSPORT_SMTP_LOG) << "clearing SMTP session pool" << s_sessionPool->sessions.count();
113 if ((!s_sessionPool->sessions.isEmpty() && s_sessionPool->sessions.contains(transport()->id())) || transport()->precommand().isEmpty()) {
155 connect(d->session, &KSmtp::Session::stateChanged, this, &SmtpJob::sessionStateChanged, Qt::UniqueConnection);
191 auto promise = KGAPI2::AccountManager::instance()->findAccount(GOOGLE_API_KEY, transport()->userName(), {KGAPI2::Account::mailScopeUrl()});
192 connect(promise, &KGAPI2::AccountPromise::finished, this, [forceRefresh, this](KGAPI2::AccountPromise *promise) {
195 promise = KGAPI2::AccountManager::instance()->refreshTokens(GOOGLE_API_KEY, GOOGLE_API_SECRET, transport()->userName());
224 const QString tokens = QStringLiteral("%1\001%2").arg(account->accessToken(), account->refreshToken());
238 if ((user.isEmpty() || passwd.isEmpty()) && transport()->authenticationType() != Transport::EnumAuthenticationType::GSSAPI) {
239 QPointer<KPasswordDialog> dlg = new KPasswordDialog(nullptr, KPasswordDialog::ShowUsernameLine | KPasswordDialog::ShowKeepPassword);
248 dlg->setRevealPasswordAvailable(KAuthorized::authorize(QStringLiteral("lineedit_reveal_password")));
Abstract base class for all mail transport jobs.
Definition: transportjob.h:30
virtual void reject()
void setErrorText(const QString &errorText)
void clearSubjobs()
void result(KJob *job)
void ref()
bool deliveryStatusNotification() const
Returns true if DSN is enabled.
Definition: transportjob.cpp:113
void finished(KGAPI2::AccountPromise *self)
virtual bool removeSubjob(KJob *job)
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
Q_GLOBAL_STATIC(Internal::StaticControl, s_instance) class ControlPrivate
Transport * transport() const
Returns the Transport object containing the mail transport settings.
Definition: transportjob.cpp:67
const QList< KJob * > & subjobs() const
void setPassword(const QString &passwd)
Sets the password of this transport.
Definition: transport.cpp:60
void quit()
void deleteLater()
State
Disconnected
ShowUsernameLine
QString i18n(const char *text, const TYPE &arg...)
Unencrypted
const Key key(const T &value) const const
STARTTLS
virtual bool addSubjob(KJob *job)
UniqueConnection
Rejected
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const const
KCONFIGCORE_EXPORT bool authorize(const QString &action)
Represents the settings of a specific mail transport.
Definition: transport.h:32
ScriptableExtension * host() const
KOPENINGHOURS_EXPORT QString currentState(const OpeningHours &oh)
QString arg(qlonglong a, int fieldWidth, int base, QChar fillChar) const const
int remove(const Key &key)
QString left(int n) const const
ShowKeepPassword
QString name(StandardShortcut id)
virtual void slotResult(KJob *job)
void emitResult()
Authenticated
int error() const
bool hasSubjobs() const
static QUrl mailScopeUrl()
void setError(int errorCode)
WA_DeleteOnClose
void finished(int result)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 6 2023 03:57:53 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 6 2023 03:57:53 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.