FBB::MailHeaders(3bobcat)

SMTP Mail Headers
(libbobcat-dev_4.08.03-x.tar.gz)

2005-2018

NAME

FBB::MailHeaders - Handles SMTP Mail Headers

SYNOPSIS

#include <bobcat/mailheaders>
Linking option: -lbobcat

DESCRIPTION

FBB::MailHeaders objects extract header lines from e-mail. Reading stops at (and including) the first blank line, which becomes the last element of the FBB::MailHeaders object, interpreted as a vector. The actual e-mail content is therefore left unread on the file containing the e-mail.

Each line stored in a MailHeaders object represents a complete header line. Headers continuing over multiple input lines are concatenated to a single line retrievable from MailHeaders objects, separated from each other by '\n' (newline) characters. The last line to join a multi-line header is not terminated by a newline character.

NAMESPACE

FBB
All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.

INHERITS FROM

-

ENUMERATIONS

The following enumerations and enumeration values can be used with the class FBB::MailHeaders:

enum Mode
This enumeration defines two values:

enum Match
This enumeration defines the following values:

NESTED TYPES

The class MailHeaders defines the following types:

Objects of these two iterator types point to header lines. Their dereferenced type is std::string.

CONSTRUCTORS

The copy and move constructors are available.

OVERLOADED OPERATORS

The move assignment operator is available

MEMBER FUNCTIONS

EXAMPLE

The following example shows the normal use of these members:

                // create a MailHeader object
    MailHeaders mh(cin, MailHeaders::DONT_READ);

    try
    {           // read the headers
        mh.read();
    }
    catch (Exception &err)
    {
        cout << err.what() << endl;
    }

    cout << "There are " << mh.size() << " header lines\n";

                // look for the Received: headers    
    mh.setHeaderIterator("Received");

                // show the Received headers
    copy(mh.beginh(), mh.endh(), 
            ostream_iterator<std::string const>(cout, "\n"));
    

FILES

bobcat/mailheaders - defines the class interface

SEE ALSO

bobcat(7)

BUGS

None Reported.

DISTRIBUTION FILES

BOBCAT

Bobcat is an acronym of `Brokken's Own Base Classes And Templates'.

COPYRIGHT

This is free software, distributed under the terms of the GNU General Public License (GPL).

AUTHOR

Frank B. Brokken (f.b.brokken@rug.nl).