diff --git a/lib/WebGUI/Mailing/Email.pm b/lib/WebGUI/Mailing/Email.pm index a6abc27..f968974 100644 --- a/lib/WebGUI/Mailing/Email.pm +++ b/lib/WebGUI/Mailing/Email.pm @@ -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 );