App-MonM

 view release on metacpan or  search on metacpan

lib/App/MonM/Channel/Email.pm  view on Meta::CPAN

        #Charset utf-8

        # SMTP extra headers
        #<Headers>
        #    X-Foo foo
        #    X-Bar bar
        #</Headers>

        # Attachments
        #<Attachment>
        #    Filename    screenshot.png
        #    Type        image/png
        #    Encoding    base64
        #    Disposition attachment
        #    Path        ./screenshot.png
        #</Attachment>
        #<Attachment>
        #    Filename    payment.pdf
        #    Type        application/pdf
        #    Encoding    base64
        #    Disposition attachment
        #    Path        ./payment.pdf
        #</Attachment>

        # SMTP options

lib/App/MonM/ConfigSkel.pm  view on Meta::CPAN

    Encoding base64

    # SMTP extra headers
    #<Headers>
    #    X-Foo foo
    #    X-Bar bar
    #</Headers>

    # Attachments
    #<Attachment>
    #    Filename    screenshot.png
    #    Type        image/png
    #    Encoding    base64
    #    Disposition attachment
    #    Path        ./screenshot.png
    #</Attachment>
    #<Attachment>
    #    Filename    payment.pdf
    #    Type        application/pdf
    #    Encoding    base64
    #    Disposition attachment
    #    Path        ./payment.pdf
    #</Attachment>

    # SMTP options

lib/App/MonM/Message.pm  view on Meta::CPAN

            from    => 'from@example.com',
            subject => "Test message",
            body    => "Body of test message",
            headers => { # optional
                    "X-My-Header" => "test",
                },
            contenttype => "text/plain", # optional
            charset     => "utf-8", # optional
            encoding    => "8bit", # optional
            attachment  => [{ # See Email::MIME
                filename => "screenshot.png",
                type     => "image/png",
                encoding => "base64",
                disposition => "attachment",
                path     => "/tmp/screenshot.png",
            }],
        );

Create new message

    my $message = App::MonM::Message->new;
    $message->load("test.msg") or die $message->error;

Load message from file



( run in 3.789 seconds using v1.01-cache-2.11-cpan-df04353d9ac )