converting to new mail queue api

This commit is contained in:
JT Smith 2006-03-21 03:36:44 +00:00
parent 7c71d93c1e
commit 47afbb0138
6 changed files with 13 additions and 13 deletions

View file

@ -648,9 +648,9 @@ sub sendEmail {
}
}
if ($to =~ /\@/) {
my $mail = WebGUI::Mail::Send->new($self->session,{to=>$to, subject=>$subject, cc=>$cc, from=>$from, bcc=>$bcc});
my $mail = WebGUI::Mail::Send->create($self->session,{to=>$to, subject=>$subject, cc=>$cc, from=>$from, bcc=>$bcc});
$mail->addText($message);
$mail->send;
$mail->queue;
} else {
my ($userId) = $self->session->db->quickArray("select userId from users where username=".$self->session->db->quote($to));
my $groupId;
@ -662,16 +662,16 @@ sub sendEmail {
$self->session->errorHandler->warn($self->getId.": Unable to send message, no user or group found.");
} else {
WebGUI::MessageLog::addEntry($userId, $groupId, $subject, $message, "", "", $from);
my $mail = WebGUI::Mail::Send->new($self->session,{to=>$cc, subject=>$subject, from=>$from});
my $mail = WebGUI::Mail::Send->create($self->session,{to=>$cc, subject=>$subject, from=>$from});
if ($cc) {
$mail->addText($message);
$mail->send;
$mail->queue;
}
if ($bcc) {
WebGUI::Mail::Send->new($self->session, {to=>$bcc, subject=>$subject, from=>$from});
WebGUI::Mail::Send->create($self->session, {to=>$bcc, subject=>$subject, from=>$from});
$mail->addText($message);
$mail->send;
$mail->queue;
}
}
}

View file

@ -993,9 +993,9 @@ sub www_viewDetail {
if ($self->session->form->process("do") eq "sendEmail") {
if ($self->session->form->process("body") ne "") {
my $u = WebGUI::User->new($self->session, $listing->{maintainerId});
my $mail = WebGUI::Mail::Send->new($self->session, {to=>$u->profileField("email"),subject=>$listing->{productName}." - ".$self->session->form->process("subject"),from=>$self->session->form->process("from")});
my $mail = WebGUI::Mail::Send->create($self->session, {to=>$u->profileField("email"),subject=>$listing->{productName}." - ".$self->session->form->process("subject"),from=>$self->session->form->process("from")});
$mail->addText($self->session->form->process("body"));
$mail->send;
$mail->queue;
}
$var{'email.wasSent'} = 1;
} else {