Add message-id and return-path for bounces that incorporates the mailId of the specific message.

This commit is contained in:
Martin Kamerbeek 2010-05-12 11:44:27 +02:00
parent 8fdeca68b5
commit 8abcb9a10e

View file

@ -115,6 +115,7 @@ sub absolutifyURIs {
sub send {
my $self = shift;
my $session = $self->session;
my $id = $session->id;
#### TODO: Error checking
my $mailing = $self->getMailing;
@ -139,11 +140,17 @@ sub send {
# Fetch subject
my $subject = '[TEST] Subject selection still needs to be implemented.';
my $messageId = $id->toHex( $self->getId );
# TODO: MAKE DOMAIN SETTABLE!
my $domain = 'geefmegeld.nl';
# Setup email
my $mail = WebGUI::Mail::Send->create( $session, {
#from => TODO
to => $to,
subject => $subject,
to => $to,
subject => $subject,
messageId => "$messageId\@$domain",
returnPath => "$messageId-bounce\@$domain",
} );
$mail->addHtml( $body );