Commit b392df79 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Convert bcc value

parent 69165aac
Pipeline #57872 passed with stage
in 40 minutes and 7 seconds
......@@ -43,6 +43,14 @@ QString ComposerViewInterface::cc() const
return {};
}
QString ComposerViewInterface::bcc() const
{
if (mComposerView) {
return mComposerView->bcc();
}
return {};
}
QString ComposerViewInterface::from() const
{
if (mComposerView) {
......
......@@ -25,6 +25,7 @@ public:
Q_REQUIRED_RESULT QString subject() const;
Q_REQUIRED_RESULT QString to() const;
Q_REQUIRED_RESULT QString cc() const;
Q_REQUIRED_RESULT QString bcc() const;
Q_REQUIRED_RESULT QString from() const;
Q_REQUIRED_RESULT MessageComposer::ComposerAttachmentInterface attachments() const;
......
......@@ -134,6 +134,22 @@ QString ConvertSnippetVariablesJob::convertVariables(MessageComposer::ComposerVi
i += strlen("CCNAME");
const QString str = getNameFromEmail(composerView->cc());
result.append(str);
} else if (cmd.startsWith(QLatin1String("BCCADDR"))) {
i += strlen("BCCADDR");
const QString str = composerView->bcc();
result.append(str);
} else if (cmd.startsWith(QLatin1String("BCCFNAME"))) {
i += strlen("BCCFNAME");
const QString str = getFirstNameFromEmail(composerView->bcc());
result.append(str);
} else if (cmd.startsWith(QLatin1String("BCCLNAME"))) {
i += strlen("BCCLNAME");
const QString str = getLastNameFromEmail(composerView->bcc());
result.append(str);
} else if (cmd.startsWith(QLatin1String("BCCNAME"))) {
i += strlen("BCCNAME");
const QString str = getNameFromEmail(composerView->bcc());
result.append(str);
} else if (cmd.startsWith(QLatin1String("FULLSUBJECT"))) {
i += strlen("FULLSUBJECT");
const QString str = composerView->subject();
......
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