Sympa::Message::Template.3Sympa - Man Page
Mail message generated from template
Synopsis
use Sympa::Message::Template; my $message = Sympa::Message::Template->new( context => $list, template => "name", rcpt => [$email], data => {});
Description
Methods
- new ( context => $that, template => $filename, rcpt => $rcpt, [ data => $data ], [ options... ] )
Constructor. Creates Sympa::Message object from template.
Parameters:
- context => $that
Content: Sympa::List, robot or '*'.
- template => $filename
Template filename (without extension).
- rcpt => $rcpt
Scalar or arrayref: SMTP "RCPT TO:" field.
If it is a scalar, tries to retrieve information of the user (See also Sympa::User.
- data => $data
Hashref used to parse template, with keys:
- return_path
SMTP "MAIL FROM:" field if sent by SMTP (see Sympa::Mailer), "Return-Path:" field if sent by spool.
Note: This parameter was OBSOLETED. Currently, {envelope_sender} attribute of object is taken from the context.
- to
"To:" header field
- lang
Language tag used for parsing template. See also Sympa::Language.
- from
"From:" field if not a full msg
Note: This parameter was OBSOLETED. The "From:" field will be filled in by "sympa" address if it is not found.
- subject
"Subject:" field if not a full msg
- replyto
"Reply-To:" field if not a full msg
- body
Body message if
$filename
is''
.Note: This feature has been deprecated.
- headers
Additional headers, hashref with keys are field names.
Below are optional parameters.
- date => $time
Delivery time of message. By default current time will be used.
- envelope_sender => $email
Forces setting envelope sender.
'<>'
may be used for null envelope sender.- priority => $priority
Forces setting priority if specified.
- tracking => $feature
Forces tracking if specified.
Returns:
New Sympa::Message instance, or
undef
if something went wrong.
See Also
Sympa::Message, Sympa::Template.
History
"new_from_template" in Sympa::Message appeared on Sympa 6.2.
It was renamed to "new" in Sympa::Message::Template on Sympa 6.2.13.