Package 'msgxtractr'

Title: Read Outlook '.msg' Files
Description: Forked from hrbrmstr/msgxtractr. 'Microsoft' 'Outlook' messages can be saved in '.msg' files. Tools are provided that enable extraction of metadata, envelope, headers, body and attachments from these files.
Authors: Matthijs S. Berends [aut], Bob Rudis [cre], Ariya Hidayat [ctb, cph] (POLE library), Nemanja Trifunovic [ctb, cph] (UTF-8 helpers <https://github.com/nemtrif/utfcpp>)
Maintainer: Bob Rudis <[email protected]>
License: AGPL
Version: 0.3.0.2
Built: 2024-11-04 05:49:50 UTC
Source: https://github.com/certe-medical-epidemiology/msgxtractr

Help Index


Decode RTF from a raw vector

Description

Decode RTF from a raw vector

Usage

decode_rtf(v)

Arguments

v

a raw vector


Is a sequence of raw bytes an RTF document?

Description

Is a sequence of raw bytes an RTF document?

Usage

is_rtf(v)

Arguments

v

a raw vector


Pretty print a 'msg' object

Description

Pretty print a 'msg' object

Usage

## S3 method for class 'msg'
print(x, ...)

Arguments

x

a "'msg'" object

...

unused


Read in an Outlook '.msg' file

Description

Read in an Outlook '.msg' file

Usage

read_msg(path)

Arguments

path

path to '.msg' file

Value

a list of extracted fields and metadata with class "msg"

Examples

read_msg(system.file("extdata/unicode.msg", package="msgxtractr"))
read_msg(system.file("extdata/TestMessage-ansi.msg", package="msgxtractr"))
read_msg(system.file("extdata/TestMessage-default.msg", package="msgxtractr"))
read_msg(system.file("extdata/TestMessage-unicode.msg", package="msgxtractr"))

Save all attachments from a 'msg" object

Description

Save all attachments from a 'msg" object

Usage

save_attachments(msg_obj, path = getwd(), use_short = TRUE, quiet = FALSE)

Arguments

msg_obj

a message object read in with read_msg()

path

directory path to save attachments in (defaults to current directory)

use_short

if TRUE then use the "short" filename from the parsed message, otherwise use the "long" filename (if it exists)

quiet

if TRUE then no informative messages will be displayed

Value

a character vector of full path names of files written out (invisibly)

Examples

x <- read_msg(system.file("extdata/unicode.msg", package="msgxtractr"))
td <- tempdir()
res <- save_attachments(x, td)
for (f in res) unlink(f)

Turn a single 'msg' object into a 'tibble'

Description

Turn a single 'msg' object into a 'tibble'

Usage

tidy_msg(x, ...)

## S3 method for class 'msg'
as_tibble(x, ...)

Arguments

x

a 'msg' object

...

passed on to [tibble::as_tibble()]