Sympa::Message::Template(3Sympa)

โœจ NAME โœจ

Sympa::Message::Template โ€” mail message generated from template ๐Ÿ’Œ

Okay bestie, this is the module in the Sympa::Message::Template manpage, and it's literally the thing that cooks up a whole mail message out of a template. It's giving "mail glow-up factory." ๐ŸŽ€


๐ŸŒธ SYNOPSIS ๐ŸŒธ

use Sympa::Message::Template;
my $message = Sympa::Message::Template->new(
    context => $list, template => "name", rcpt => [$email], data => {});

That's the whole vibe right there. Load it, build it, slay. ๐Ÿ’…


๐Ÿ’– DESCRIPTION ๐Ÿ’–

๐Ÿงš Methods

new ( context => $that, template => $filename, rcpt => $rcpt, [ data => $data ], [ options... ] )

Constructor energy! โœจ It creates a Sympa::Message object out of a template. No cap.

Parameters:

  • context => $that โ€” What it is: a Sympa::List, a robot, or '*'. ๐Ÿซถ
  • template => $filename โ€” The template filename (without extension, ok? just the name, the extension is not the moment).
  • rcpt => $rcpt โ€” Scalar or arrayref representing the SMTP "RCPT TO:" field. ๐Ÿ“ฎ

If it's a scalar, it tries to retrieve information of the user (see also Sympa::User).

  • data => $data โ€” A hashref used to parse the template, with keys like:
    • return_path โ€” The SMTP "MAIL FROM:" field if it's sent by SMTP (see Sympa::Mailer), or the "Return-Path:" field if it's sent by spool.
Note: this parameter was OBSOLETED. Currently, the {envelope_sender} attribute of the object is taken from the context. ๐Ÿ’€
  • to โ€” The "To:" header field.
  • lang โ€” The language tag used for parsing the template. See also Sympa::Language. ๐ŸŒˆ
  • from โ€” The "From:" field, if it's not a full msg.
Note: this parameter was OBSOLETED. The "From:" field will be filled in by the "sympa" address if it isn't found. ๐Ÿซ 
  • subject โ€” The "Subject:" field, if it's not a full msg.
  • replyto โ€” The "Reply-To:" field, if it's not a full msg.
  • body โ€” The body message if $filename is ''.
Note: this feature has been deprecated. ๐Ÿ‘‘
  • headers โ€” Additional headers; it's a hashref whose keys are field names.

Below are optional parameters. (yes, the fun ones ๐Ÿ˜Œ)

  • date => $time โ€” Delivery time of the message. By default, the current time will be used. โฐ
  • envelope_sender => $email โ€” Forces setting the envelope sender. '<>' may be used for a null envelope sender.
  • priority => $priority โ€” Forces setting priority if specified. ๐Ÿ”ฅ
  • tracking => $feature โ€” Forces tracking if specified.

Returns:

A new Sympa::Message instance โ€” or undef if something went wrong. ๐Ÿ˜ญ (and bestie, if you get undef, that's your sign, fr fr)


๐Ÿฆ‹ 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. glow-up era โœจ

And that's the whole page, periodt. ๐Ÿ’… This lil legend was served up by sympa 6.2.80, dated 2026-10-19, under the name Sympa::Message::Template(3Sympa) โ€” tysm for reading, ily, go send some beautiful mail ๐Ÿซถ๐Ÿ’–๐ŸŽ€

๐Ÿ“ฆ where this page comes from