/usr/lib/x86_64-linux-gnu/perl5/5.22/Embperl/Syntax/Mail.pm is in libembperl-perl 2.5.0-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | ###################################################################################
#
# Embperl - Copyright (c) 1997-2008 Gerald Richter / ecos gmbh www.ecos.de
# Embperl - Copyright (c) 2008-2014 Gerald Richter
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the Perl README file.
#
# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# $Id: Mail.pm 1578075 2014-03-16 14:01:14Z richter $
#
###################################################################################
package Embperl::Syntax::Mail ;
use Embperl::Syntax qw{:types} ;
use Embperl::Syntax::HTML ;
use strict ;
use vars qw{@ISA} ;
@ISA = qw(Embperl::Syntax::HTML) ;
###################################################################################
#
# Methods
#
###################################################################################
# ---------------------------------------------------------------------------------
#
# Create new Syntax Object
#
# ---------------------------------------------------------------------------------
sub new
{
my $class = shift ;
my $self = Embperl::Syntax::HTML::new ($class) ;
if (!$self -> {-mailInit})
{
$self -> {-mailInit} = 1 ;
Init ($self) ;
}
return $self ;
}
###################################################################################
#
# Definitions for Mail HTML tags
#
###################################################################################
sub Init
{
my ($self) = @_ ;
$self -> AddTagBlock ('mail:send', ['from', 'to', 'cc', 'bcc', 'subject', 'reply-to',
'mailhost', 'mailhelo', 'maildebug', 'content-type'],
undef, undef,
{
removenode => 106,
compiletimeperlcode => q{
$_ep_mail_opt_save = $Embperl::req->component->config->options ;
$Embperl::req->component->config->options (Embperl::Constant::optKeepSpaces | $_ep_mail_opt_save) ;
},
compiletimeperlcodeend => q{
$Embperl::req->component->config->options ($_ep_mail_opt_save) ;
},
perlcodeend => q{
{
use Embperl::Mail ;
my $txt = XML::Embperl::DOM::Node::iChildsText (%$n%) ;
my @errors ;
$? = Embperl::Mail::Execute (
{
'input' => \$txt,
'inputfile' => 'mail',
'errors' => \@errors,
'syntax' => 'Text',
'from' => %&'from%,
'to' => %&'to%,
'cc' => %&'cc%,
'bcc' => %&'bcc%,
'subject' => %&'subject%,
'reply-to' => %&'reply-to%,
'mailhost' => %&'mailhost%,
'mailhelo' => %&'mailhelo%,
'maildebug' => %&'maildebug%,
'mailheaders' => [ (( %&'content-type% ) ? ('Content-Type: '.%&'content-type%) : ()) ],
}) ;
print STDERR join ('; ', @errors) if (@errors) ;
}
},
stackname => 'mail_send',
'push' => '%$x%',
},
) ;
}
###################################################################################
#
# Mail Implementation
#
###################################################################################
1;
__END__
=pod
=head1 NAME
Embperl::Syntax::Mail - tag library for sending mail
=head1 SYNOPSIS
[$ syntax + Mail $]
<mail:send to="richter@ecos.de" subject="Testmail">
Hi,
this is a test for a new mail tag
it is send at [+ scalar(localtime) +]
from Embperl's Mail taglib.
</mail:send>
[$ if $? $]
<h2>Sorry, there was an error, your mail couldn't be send</h2>
[$else$]
<h2>Your mail was successfully delivered</h2>
[$endif$]
=head1 DESCRIPTION
The is module provides a mail:send tag, for sending text via email. It uses the
Embperl::Mail module for actualy sending the mail. The following attributes
are recognized. The mail body is enclosed between the mail:send tags.
See L<Embperl::Mail> for an description of the attribues:
=over 4
=item from
=item to
=item cc
=item bcc
=item subject
=item reply-to
=item mailhost
=item mailhelo
=item maildebug
=item content-type
=back
On success it sets C<$?> to zero, otherwise to a value other then zero.
=head1 Author
Gerald Richter <richter at embperl dot org>
=head1 See Also
Embperl::Syntax, Embperl::Syntax::HTML
|