Mail(3pm)

πŸ“¦
version 2.5.0 Β· 2 versions
, in ubuntu jammy

πŸ’Œ Mail(3pm) β€” the manual page, but make it a group chat

okay bestie, so this is the page for Embperl::Mail β€” the manual's literally called Mail(3pm) and it's filed under Perl's user-contributed docs. Let me put you on. 🫢


✨ NAME ✨

Embperl::Mail β€” Sends results from Embperl via E-Mail πŸ’Œ


πŸŽ€ SYNOPSIS πŸŽ€

use Embperl::Mail ;

Embperl::Mail::Execute ({inputfile => 'template.epl',
                               subject   => 'Test Embperl::Mail::Execute',
                               to        => 'email@foo.org'}) ;

🌸 DESCRIPTION 🌸

So Embperl::Mail uses Embperl to process a page template, and then it sends the result out via EMail. That's the whole plot. ✨

Right now, only plain text mails are supported. A later version may add support for HTML mails β€” so watch this space, no promises. And because of that fact, normal Embperl HTML processing is disabled per Default (check the options down below, bestie).


πŸ’… Execute

The "Execute" function can handle all the parameters that "Embperl::Execute" does. On top of that, these additional parameters are recognized:

  • from β€” gives the sender e-mail address.
  • to β€” gives the recipient address(es). Multiply addresses can either be separated by semikolon or given as an array ref. (yes, "multiply" β€” that's what the page says, we don't fix, we report πŸ’€)
  • cc β€” gives the recipient address(es) which should receive a carbon copy. Multiply addresses can either be separated by semikolon or given as an array ref.
  • bcc β€” gives the recipient address(es) which should receive a blind carbon copy. Multiply addresses can either be separated by semikolon or given as an array ref.
  • subject β€” gives the subject line.
  • reply-to β€” the given address is insert as reply address.
  • mailheaders β€” Array ref of additional mail headers.
  • headerencoding (2.0b9+) β€” Tells Embperl::Mail which charset definition to include in any header that contains character code 128-255 and therefore needs encoding. Defaults to iso-8859-1. Pass empty string to turn encoding of header fields of. πŸ™ˆ
  • mailhost β€” Specifies which host to use as SMTP server. Default is localhost.
  • mailhelo β€” Specifies which host/domain to use in the HELO/EHLO command. A reasonable default is normally chosen by Net::SMTP, but depending on your installation it may necessary to set it manualy.
  • maildebug β€” Set to 1 to enable debugging of mail transfer.
  • options β€” If no "options" are given the following are used per default: optDisableHtmlScan, optRawInput, optKeepSpaces, optReturnError.
  • escmode β€” In contrast to normal Embperl escmode defaults to zero (no escape). 🧚
  • errors β€” As in "Embperl::Execute" you can specify an array ref, which returns all the error messages from template processing. If you don't specify this parameter "Execute" will die when an error occurs. πŸ’€

πŸ¦‹ Configuration

Some default values could be setup via environment variables.

IMPORTANT: For now Embperl::Mail does not honour the Embperl configuration directives in your httpd.conf. Only values set via the environment are accepted (e.g. via SetEnv or PerlSetEnv). Periodt. πŸ‘‘

🌈 EMBPERL_MAILHOST

Specifies which host to use as SMTP server. Default is localhost.

🌈 EMBPERL_MAILHELO

Specifies which host/domain to use in the HELO/EHLO command. A reasonable default is normally chosen by Net::SMTP, but depending on your installation it may necessary to set it manualy.

🌈 EMBPERL_MAILFROM

Specifies which the email address that is used as sender. Default is www-server@server_name.

🌈 EMBPERL_MAILDEBUG

Debug setting for Net::SMTP. Default is 0.


πŸ‘‘ Author

G. Richter (richter at embperl dot org)


πŸ”₯ See Also

perl(1), Embperl, Net::SMTP


and that's the whole page, bestie 🫢 this doc is perl v5.34.0, dated 2022-02-06, and it lives under Mail(3pm) in the user-contributed Perl docs. ate and left no crumbs πŸ’…βœ¨

πŸ“¦ where this page comes from