version 1.95, 2004/03/26 19:35:59
|
version 1.97, 2004/04/06 15:56:37
|
Line 110 my $sqs;
|
Line 110 my $sqs;
|
|
|
sub packagemsg { |
sub packagemsg { |
my ($subject,$message,$citation,$baseurl,$attachmenturl)=@_; |
my ($subject,$message,$citation,$baseurl,$attachmenturl)=@_; |
$message =&HTML::Entities::encode($message); |
$message =&HTML::Entities::encode($message,'<>&"'); |
$citation=&HTML::Entities::encode($citation); |
$citation=&HTML::Entities::encode($citation,'<>&"'); |
$subject =&HTML::Entities::encode($subject); |
$subject =&HTML::Entities::encode($subject,'<>&"'); |
#remove machine specification |
#remove machine specification |
$baseurl =~ s|^http://[^/]+/|/|; |
$baseurl =~ s|^http://[^/]+/|/|; |
$baseurl =&HTML::Entities::encode($baseurl); |
$baseurl =&HTML::Entities::encode($baseurl,'<>&"'); |
#remove machine specification |
#remove machine specification |
$attachmenturl =~ s|^http://[^/]+/|/|; |
$attachmenturl =~ s|^http://[^/]+/|/|; |
$attachmenturl =&HTML::Entities::encode($attachmenturl); |
$attachmenturl =&HTML::Entities::encode($attachmenturl,'<>&"'); |
|
|
my $now=time; |
my $now=time; |
$msgcount++; |
$msgcount++; |
Line 205 sub sendemail {
|
Line 205 sub sendemail {
|
my $msg = new Mail::Send; |
my $msg = new Mail::Send; |
$msg->to($to); |
$msg->to($to); |
$msg->subject('[LON-CAPA] '.$subject); |
$msg->subject('[LON-CAPA] '.$subject); |
if (my $fh = $msg->open('smtp',Server => 'localhost')) { |
if (my $fh = $msg->open()) { |
print $fh $body; |
print $fh $body; |
$fh->close; |
$fh->close; |
} |
} |