MessageHelper Namespace Reference


void applyIdentity (const KMime::Message::Ptr &message, const KIdentityManagement::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, KIdentityManagement::IdentityManager *, uint id, bool idHeaders=true)
void initHeader (const KMime::Message::Ptr &message, const KIdentityManagement::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

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

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

Definition at line 59 of file messagehelper.cpp.

void MessageHelper::initFromMessage ( const KMime::Message::Ptr msg,
const KMime::Message::Ptr origMsg,
KIdentityManagement::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 37 of file messagehelper.cpp.

void MESSAGECOMPOSER_EXPORT MessageHelper::initHeader ( const KMime::Message::Ptr message,
const KIdentityManagement::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 26 of file messagehelper.cpp.

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

This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Sep 27 2021 23:17:08 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.