Messagelib

emailaddressresolvejob.h
1/*
2 * This file is part of KMail.
3 *
4 * SPDX-FileCopyrightText: 2010 KDAB
5 * SPDX-FileContributor: Tobias Koenig <tokoe@kde.org>
6 * SPDX-FileContributor: Leo Franchi <lfranchi@kde.org>
7 *
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10
11#pragma once
12
13#include "messagecomposer_export.h"
14
15#include <KJob>
16
17#include <QStringList>
18
19namespace MessageComposer
20{
21class Composer;
22
23class EmailAddressResolveJobPrivate;
24/**
25 * @short A job to resolve nicknames, distribution lists and email addresses for queued emails.
26 */
27class MESSAGECOMPOSER_EXPORT EmailAddressResolveJob : public KJob
28{
29 Q_OBJECT
30
31public:
32 /**
33 * Creates a new email address resolve job.
34 *
35 * @param parent The parent object.
36 */
37 explicit EmailAddressResolveJob(QObject *parent = nullptr);
38
39 /**
40 * Destroys the email address resolve job.
41 */
43
44 /**
45 * Starts the job.
46 */
47 void start() override;
48
49 /**
50 * Sets the from address to expand.
51 */
52 void setFrom(const QString &from);
53
54 /**
55 * Sets the from address to expand.
56 */
57 void setTo(const QStringList &from);
58
59 /**
60 * Sets the from address to expand.
61 */
62 void setCc(const QStringList &from);
63
64 /**
65 * Sets the from address to expand.
66 */
67 void setBcc(const QStringList &from);
68 /**
69 * Sets the Reply-To address to expand.
70 */
71 void setReplyTo(const QStringList &replyTo);
72
73 /**
74 * Returns the expanded From field
75 */
76 [[nodiscard]] QString expandedFrom() const;
77
78 /**
79 * Returns the expanded To field
80 */
81 [[nodiscard]] QStringList expandedTo() const;
82
83 /**
84 * Returns the expanded CC field
85 */
86 [[nodiscard]] QStringList expandedCc() const;
87
88 /**
89 * Returns the expanded Bcc field
90 */
91 [[nodiscard]] QStringList expandedBcc() const;
92
93 void setDefaultDomainName(const QString &domainName);
94 /**
95 * Returns the expanded Reply-To field
96 */
97 [[nodiscard]] QStringList expandedReplyTo() const;
98
99private:
100 MESSAGECOMPOSER_NO_EXPORT void slotAliasExpansionDone(KJob *);
101 std::unique_ptr<EmailAddressResolveJobPrivate> const d;
102};
103}
A job to resolve nicknames, distribution lists and email addresses for queued emails.
~EmailAddressResolveJob() override
Destroys the email address resolve job.
Q_SCRIPTABLE Q_NOREPLY void start()
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:12 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.