[Affelio-cvs 219] CVS update: affelio/lib/Affelio/NetLib

Back to archive index

Tadashi Okoshi slash****@users*****
2005年 6月 28日 (火) 02:50:27 JST


Index: affelio/lib/Affelio/NetLib/Email.pm
diff -u affelio/lib/Affelio/NetLib/Email.pm:1.2 affelio/lib/Affelio/NetLib/Email.pm:1.3
--- affelio/lib/Affelio/NetLib/Email.pm:1.2	Sat Jun 25 21:14:07 2005
+++ affelio/lib/Affelio/NetLib/Email.pm	Tue Jun 28 02:50:27 2005
@@ -4,15 +4,38 @@
 #    http://affelio.jp/ (Japan)
 #    http://affelio.jp/ (USA and other area)
 #
-# $Id: Email.pm,v 1.2 2005/06/25 12:14:07 slash5234 Exp $
+# $Id: Email.pm,v 1.3 2005/06/27 17:50:27 slash5234 Exp $
 
 package Affelio::NetLib::Email; 
 {
     use strict;
+    use lib("../../../extlib");
     use Exporter;
     use Jcode;
+    use lib("../../../lib");
+    use Affelio::misc::Debug;
     @Affelio::NetLib::Email::ISA = "Exporter";
-    @Affelio::NetLib::Email::EXPORT = qw (encode_mail_subject);
+    @Affelio::NetLib::Email::EXPORT = qw (encode_mail_subject send_email);
+
+    sub send_email{
+	my $af = shift;
+	my $from = shift;
+	my $to = shift;
+	my $title = shift;
+	my $body = shift;
+
+        ###########################################
+	Affelio::misc::Debug::debug_print("send_mail_ack: $af->{cmd__sendmail} -t\n");
+	#Sendmail
+	open(MAIL, " |  $af->{cmd__sendmail} -t ");
+	print MAIL "To: $to\n";
+	print MAIL "From: $from\n";
+	print MAIL "Subject: $title\n\n";
+	print MAIL "$body\n";
+	print MAIL "\n";
+	close(MAIL);
+    }
+
 
     ########################################################################
     #encode_mail_subject


Affelio-cvs メーリングリストの案内
Back to archive index