MessageHelper Namespace Reference


void applyIdentity (const KMime::Message::Ptr &message, const KIdentityManagementCore::IdentityManager *identMan, uint id)
KMime::Types::AddrSpecList extractAddrSpecs (const KMime::Message::Ptr &msg, const QByteArray &header)
void initFromMessage (const KMime::Message::Ptr &msg, const KMime::Message::Ptr &orgiMsg, KIdentityManagementCore::IdentityManager *, uint id, bool idHeaders=true)
void initHeader (const KMime::Message::Ptr &message, const KIdentityManagementCore::IdentityManager *identMan, uint id=0)
void setAutomaticFields (const KMime::Message::Ptr &msg, bool isMultipart=false)

Detailed Description

Contains random helper methods when dealing with messages.

TODO: cleanup and organize, along with similar methods in messageviewer.

Function Documentation

◆ applyIdentity()

void MessageHelper::applyIdentity ( const KMime::Message::Ptr message,
const KIdentityManagementCore::IdentityManager identMan,
uint  id 

Set the from, to, cc, bcc, encryption etc headers as specified in the given identity.

Definition at line 57 of file messagehelper.cpp.

◆ initFromMessage()

void MessageHelper::initFromMessage ( const KMime::Message::Ptr msg,
const KMime::Message::Ptr origMsg,
KIdentityManagementCore::IdentityManager identMan,
uint  id,
bool  idHeaders 

Initialize headers fields according to the identity and the transport header of the given original message.

Definition at line 35 of file messagehelper.cpp.

◆ initHeader()

void MESSAGECOMPOSER_EXPORT MessageHelper::initHeader ( const KMime::Message::Ptr message,
const KIdentityManagementCore::IdentityManager identMan,
uint  id = 0 

Initialize header fields.

Should be called on new messages if they are not set manually. E.g. before composing. Calling of setAutomaticFields(), see below, is still required.

Definition at line 24 of file messagehelper.cpp.

◆ setAutomaticFields()

void MessageHelper::setAutomaticFields ( const KMime::Message::Ptr msg,
bool  isMultipart = false 

Set fields that are either automatically set (Message-id) or that do not change from one message to another (MIME-Version).

Call this method before sending after all changes to the message are done because this method does things different if there are attachments / multiple body parts.

Definition at line 150 of file messagehelper.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Sep 29 2023 04:01:54 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.