The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::wsgetmail::MDA - Deliver mail to another command's standard input

SYNOPSIS

    my $mda = App::wsgetmail::MDA->new({
      command => "/opt/rt5/bin/rt-mailgate",
      command_args => "--url https://rt.example.com --queue General --action correspond",
      command_timeout => 15,
      debug => 0,
    })
    $mda->forward($message, $message_path);

DESCRIPTION

App::wsgetmail::MDA takes mail fetched from web services and routes it to another command via standard input.

ATTRIBUTES

You can initialize a new App::wsgetmail::MDA object with the attributes below. command and command_args are required; the rest are optional. All attributes are read-only.

command

A string with the executable to run. You can specify an absolute path, or a plain command name which will be found from $PATH.

command_args

A string with additional arguments to call command with. These arguments follow shell quoting rules: you can escape characters with a backslash, and denote a single string argument with single or double quotes.

command_timeout

A number. The run command will be terminated if it takes longer than this many seconds.

debug

A boolean. If true, the object will issue additional diagnostic warnings if it encounters any trouble.

Unused Attributes

These attributes were used in previous versions of the module. They are currently unimplemented and always return undef. You cannot initialize them.

  • extension

  • recipient

METHODS

forward($message, $filename)

Invokes the configured command to deliver the given message. $message is an object like App::wsgetmail::MS365::Message. $filename is the path to a file with the raw message content.

AUTHOR

Best Practical Solutions, LLC <modules@bestpractical.com>

LICENSE AND COPYRIGHT

This software is Copyright (c) 2015-2020 by Best Practical Solutions, LLC.

This is free software, licensed under:

The GNU General Public License, Version 2, June 1991