3e5de3a0b3
store the header in a Mail::Header object for easier processing by the plugins git-svn-id: https://svn.perl.org/qpsmtpd/branches/v010@29 958fd67b-6ff1-0310-b445-bb7760255be9
56 lines
831 B
Perl
56 lines
831 B
Perl
package Qpsmtpd::Transaction;
|
|
use strict;
|
|
|
|
sub new { start(@_) }
|
|
|
|
sub start {
|
|
my $proto = shift;
|
|
my $class = ref($proto) || $proto;
|
|
my %args = @_;
|
|
my $self = { _rcpt => [], started => time };
|
|
bless ($self, $class);
|
|
}
|
|
|
|
sub add_recipient {
|
|
my $self = shift;
|
|
@_ and push @{$self->{_recipients}}, shift;
|
|
}
|
|
|
|
sub recipients {
|
|
my $self = shift;
|
|
($self->{_recipients} ? @{$self->{_recipients}} : ());
|
|
}
|
|
|
|
sub sender {
|
|
my $self = shift;
|
|
@_ and $self->{_sender} = shift;
|
|
$self->{_sender};
|
|
}
|
|
|
|
sub header {
|
|
my $self = shift;
|
|
@_ and $self->{_header} = shift;
|
|
$self->{_header};
|
|
}
|
|
|
|
sub body {
|
|
my $self = shift;
|
|
@_ and $self->{_body} = shift;
|
|
$self->{_body};
|
|
}
|
|
|
|
sub blocked {
|
|
my $self = shift;
|
|
@_ and $self->{_blocked} = shift;
|
|
$self->{_blocked};
|
|
}
|
|
|
|
|
|
#sub add_header_line {
|
|
#}
|
|
|
|
#sub add_body_line {
|
|
#}
|
|
|
|
1;
|