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 56 of file messagehelper.cpp.

◆ extractAddrSpecs()

MESSAGECOMPOSER_EXPORT KMime::Types::AddrSpecList MessageHelper::extractAddrSpecs ( const KMime::Message::Ptr & msg,
const QByteArray & header )

Definition at line 131 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 34 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 23 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 149 of file messagehelper.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:49:08 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.