- fix: cs mail needs archive url

- fix: cs mail not sending in-reply-to and references headers
 - fix: cs mail doesn't like code via email
 - CS mail now sends out the email address of the poster as from, when it 
   exists.
This commit is contained in:
JT Smith 2006-07-19 18:37:33 +00:00
parent 534855ddc8
commit 45080ea0d9
5 changed files with 116 additions and 17 deletions

View file

@ -94,6 +94,30 @@ sub addFooter {
$self->addText($text);
}
#-------------------------------------------------------------------
=head2 addHeaderField ( name, value )
Adds a header field to the mail message. See also replaceHeaderField().
=head3 name
The name of the field to add.
=head3 value
The value of the field to add.
=cut
sub addHeaderField {
my $self = shift;
my $name = shift;
my $value = shift;
$self->{_message}->head->add($name, $value);
}
#-------------------------------------------------------------------
=head2 addHtml ( html )
@ -219,7 +243,7 @@ sub create {
my $from = $headers->{from} || $session->setting->get("companyEmail");
my $type = $headers->{contentType} || "multipart/mixed";
my $domain = $from;
$domain =~ s/\@(.*)/$1/;
$domain =~ s/.*\@(.*)/$1/;
my $id = $headers->{messageId} || "WebGUI-".$session->id->generate;
unless ($id =~ m/\@/) {
$id .= '@'.$domain;
@ -285,6 +309,30 @@ sub queue {
}
#-------------------------------------------------------------------
=head2 replaceHeaderField ( name, value )
Replaces an existing header field in the mail message, or creates it if it doesn't exist. See also addHeaderField().
=head3 name
The name of the field to replace.
=head3 value
The value of the field to replace.
=cut
sub replaceHeaderField {
my $self = shift;
my $name = shift;
my $value = shift;
$self->{_message}->head->replace($name, $value);
}
#-------------------------------------------------------------------
=head2 retrieve ( session, messageId )