Email::MIME::Kit::Bulk::Target - Destination for an Email::MIME::Kit::Bulk email
version 0.0.3
use Email::MIME::Kit::Bulk::Target; my $target = Email::MIME::Kit::Bulk::Target->new( to => 'someone@somewhere.com', cc => [ 'someone_else@somewhere.com' ], bcc => [ 'sneaky@somewhere.com' ], from => 'me@somewhere.com', language => 'en', template_params => { greetings => 'Hi', }, extra_attachments => [ 'foo.pdf' ] ); Email::MIME::Kit::Bulk->new( kit => '/path/to/mime/kit', processes => 5, targets => [ $target ], )->send;
A Email::MIME::Kit::Bulk object will produce one email for every Email::MIME::Kit::Bulk::Target object it is given. Each target object defines the recipients of the email, and can also be take attachments, specific From address and custom parameters for the MIME kit template.
Email::MIME::Kit::Bulk::Target
Constructor.
To Email address. Can be a string or a MooseX::Types::Email::EmailAddress object.
To
Required.
Cc Email addressses. Array ref of MooseX::Types::Email::EmailAddress objects.
Cc
Bcc Email addressses. Array ref of MooseX::Types::Email::EmailAddress objects.
Bcc
Address to use for the From originator. Must be a MooseX::Types::Email::EmailAddress object.
From
Language to use for this target.
Parameters to be passed to the Email::MIME::Kit template.
Attachments to add to the email for this target.
Returns the MooseX::Types::Email::EmailAddress object for the To recipient.
my @cc = $target->cc;
Returns the list of MooseX::Types::Email::EmailAddress objects for the Cc recipients.
my @bcc = $target->bcc;
Returns the list of MooseX::Types::Email::EmailAddress objects for the Bcc recipients.
my $from = $target->from;
Returns the MooseX::Types::Email::EmailAddress object for the From originator.
my $lang = $target->language;
Returns the language set for the target.
Returns true if a language was set for the target.
Returns the hash ref of the parameters that will be passed to the Email::MIME::Kit template.
Returns the list of extra attachments that will be added to the email for this target.
Returns all the recipients (To, Cc and Bcc combined) of the email.
Jesse Luehrs <doy@cpan.org>
Yanick Champoux <yanick.champoux@iinteractive.com>
This software is copyright (c) 2017 by Infinity Interactive <contact@iinteractive.com>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Email::MIME::Kit::Bulk, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Email::MIME::Kit::Bulk
CPAN shell
perl -MCPAN -e shell install Email::MIME::Kit::Bulk
For more information on module installation, please visit the detailed CPAN module installation guide.