summaryrefslogtreecommitdiff
path: root/LedgerSMB/Mailer.pm
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB/Mailer.pm')
-rwxr-xr-xLedgerSMB/Mailer.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/LedgerSMB/Mailer.pm b/LedgerSMB/Mailer.pm
index eb1d4a9b..0e14c8f4 100755
--- a/LedgerSMB/Mailer.pm
+++ b/LedgerSMB/Mailer.pm
@@ -50,10 +50,13 @@ sub send {
my ($self) = @_;
my $domain = $self->{from};
+ my $boundary = time;
+ $boundary = "LSMB-$boundary";
$domain =~ s/(.*?\@|>)//g;
my $msgid = "$boundary\@$domain";
$self->{contenttype} = "text/plain" unless $self->{contenttype};
+ my $msgid = "$boundary\@$domain";
my %h;
for (qw(from to cc bcc)) {
@@ -77,7 +80,9 @@ sub send {
'Subject' => $self->{subject},
'Type' => 'TEXT',
'Data' => $self->{message},
+ 'Message-ID' => $msg_id,
);
+ $msg->attr("Content-Type" => $self->{contenttype});
$msg->add( 'Disposition-Notification-To' => $self->{from} )
if $self->{notify};
$msg->replace( 'X-Mailer' => "LedgerSMB $self->{version}" );