Commit 76ded778 authored by Leigh Stoller's avatar Leigh Stoller

Add SendEmail($self, $subject, $body) for sending email to users.

Might not be in its final form yet.
parent 78aacb3f
...@@ -1286,6 +1286,25 @@ sub SendVerifiedEmail($) ...@@ -1286,6 +1286,25 @@ sub SendVerifiedEmail($)
return 0; return 0;
} }
sub SendEmail($$$)
{
my ($self, $subject, $body) = @_;
# Must be a real reference.
return -1
if (! ref($self));
my $uid = $self->uid();
my $user_email = $self->usr_email();
my $user_name = $self->name();
# Audit email.
SENDMAIL("$user_name <$user_email>", $subject, $body,
undef, "Bcc: $TBAUDIT");
return 0;
}
# #
# Return group membership for a user. # Return group membership for a user.
# #
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment