[Affelio-cvs 218] CVS update: affelio/lib/Affelio/Managing

Back to archive index

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


Index: affelio/lib/Affelio/Managing/MessageManager.pm
diff -u affelio/lib/Affelio/Managing/MessageManager.pm:1.2 affelio/lib/Affelio/Managing/MessageManager.pm:1.3
--- affelio/lib/Affelio/Managing/MessageManager.pm:1.2	Sat Jun 25 21:14:06 2005
+++ affelio/lib/Affelio/Managing/MessageManager.pm	Tue Jun 28 02:50:27 2005
@@ -4,7 +4,7 @@
 #    http://affelio.jp/ (Japan)
 #    http://affelio.jp/ (USA and other area)
 #
-# $Id: MessageManager.pm,v 1.2 2005/06/25 12:14:06 slash5234 Exp $
+# $Id: MessageManager.pm,v 1.3 2005/06/27 17:50:27 slash5234 Exp $
 
 package Affelio::Managing::MessageManager;
 {
@@ -17,6 +17,7 @@
     use Affelio::misc::Time qw(get_timestamp);
     use Affelio::misc::Encoding qw(db_encode db_decode);
     use Affelio::misc::Debug qw(debug_print);
+    use Affelio::NetLib::Email qw(send_email);
 
     #######################################################################
     #Constructor
@@ -175,8 +176,15 @@
 	$sth = $af->{db}->prepare($str1) or die $af->{db}->errstr;
 	$sth->execute or  die $af->{db}->errstr;
 
-	Affelio::misc::Debug::debug_print("MM::post_message: end.");
+	##############################
+	#Email notification if needed
+	if($af->{userpref__mesging__emailflg} eq "yes"){
+	    my $abs_URL = $af->{site__web_root} . "/admin.cgi?mode=messages&action=show&mid=$newid";
+	    Affelio::NetLib::Email::send_email($af, "Your Affelio <$af->{user__email1}>", $af->{user__email1}, "New message to your Affelio", $abs_URL);
+	    Affelio::misc::Debug::debug_print("MM::post_message: Email sent!");
+	}
 
+	Affelio::misc::Debug::debug_print("MM::post_message: end.");
 	return("");
     }
 


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