[vhffs-dev] [901] Added mailtag to accepted or refused notificatons, modified the send_mail functions |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 901
Author: gradator
Date: 2007-09-10 05:10:04 +0000 (Mon, 10 Sep 2007)
Log Message:
-----------
Added mailtag to accepted or refused notificatons, modified the send_mail functions
Modified Paths:
--------------
trunk/vhffs-api/src/Vhffs/Functions.pm
trunk/vhffs-api/src/Vhffs/Object.pm
trunk/vhffs-api/src/Vhffs/User.pm
trunk/vhffs-panel/alert_submit.pl
trunk/vhffs-panel/mailinglist/add_sub.pl
trunk/vhffs-robots/src/cvs_refused.pl
trunk/vhffs-robots/src/dns_refused.pl
trunk/vhffs-robots/src/group_refused.pl
trunk/vhffs-robots/src/mail_refused.pl
trunk/vhffs-robots/src/mailing.pl
trunk/vhffs-robots/src/mailinglist_refused.pl
trunk/vhffs-robots/src/mysql_refused.pl
trunk/vhffs-robots/src/pgsql_refused.pl
trunk/vhffs-robots/src/repository_refused.pl
trunk/vhffs-robots/src/svn_refused.pl
trunk/vhffs-robots/src/web_refused.pl
Modified: trunk/vhffs-api/src/Vhffs/Functions.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Functions.pm 2007-09-10 04:45:04 UTC (rev 900)
+++ trunk/vhffs-api/src/Vhffs/Functions.pm 2007-09-10 05:10:04 UTC (rev 901)
@@ -252,34 +252,27 @@
sub send_mail
{
use MIME::Lite;
- #my ( $from , $to , $subject , $message ) = @_;
+
my $from = shift;
my $to = shift;
+ my $mailtag = shift;
my $subject = shift;
my $message = shift;
- my $vhffs = shift;
- if( defined $vhffs )
- {
- my $mailtag = $vhffs->get_config->get_mailtag;
+ $subject = $mailtag.' '.$subject if( defined $mailtag );
- if( defined $mailtag )
- {
- $subject = $mailtag . " " . $subject;
- }
- }
+ my $msg = new MIME::Lite
+ From => "$from",
+ To => "$to",
+ Subject => "$subject",
+ Type => 'text/plain; charset=utf-8',
+ Data => "$message";
+ $msg->send;
- my $msg = new MIME::Lite
- From => "$from",
- To => "$to",
- Subject => "$subject",
- Type => 'text/plain; charset=utf-8',
- Data => "$message";
- $msg -> send;
-
- return( 1 );
+ return 1;
}
+
sub obfuscate_email($$) {
my ($vhffs, $mail) = @_;
Modified: trunk/vhffs-api/src/Vhffs/Object.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Object.pm 2007-09-10 04:45:04 UTC (rev 900)
+++ trunk/vhffs-api/src/Vhffs/Object.pm 2007-09-10 05:10:04 UTC (rev 901)
@@ -410,7 +410,7 @@
$vhffs->get_config->get_host_name
);
- Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $user->get_mail , $subject , $mail );
+ Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $user->get_mail , $vhffs->get_config->get_mailtag , $subject , $mail );
$user->set_note( $user->get_note +1 );
$user->commit;
Modified: trunk/vhffs-api/src/Vhffs/User.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/User.pm 2007-09-10 04:45:04 UTC (rev 900)
+++ trunk/vhffs-api/src/Vhffs/User.pm 2007-09-10 05:10:04 UTC (rev 901)
@@ -365,7 +365,7 @@
$from = $vhffs->get_config->get_master_mail;
$from = "vhffs\@nosrc.com" if( ! defined $from );
- Vhffs::Functions::send_mail( $from , $user->get_mail, $subject, $content, $vhffs);
+ Vhffs::Functions::send_mail( $from , $user->get_mail , $vhffs->get_config->get_mailtag , $subject , $content );
}
Modified: trunk/vhffs-panel/alert_submit.pl
===================================================================
--- trunk/vhffs-panel/alert_submit.pl 2007-09-10 04:45:04 UTC (rev 900)
+++ trunk/vhffs-panel/alert_submit.pl 2007-09-10 05:10:04 UTC (rev 901)
@@ -75,7 +75,7 @@
use Vhffs::Functions;
- Vhffs::Functions::send_mail( $from , $to , $subject , $message );
+ Vhffs::Functions::send_mail( $from , $to , undef , $subject , $message );
$template->param( MESSAGE => gettext("Message sent successfully") );
}
Modified: trunk/vhffs-panel/mailinglist/add_sub.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/add_sub.pl 2007-09-10 04:45:04 UTC (rev 900)
+++ trunk/vhffs-panel/mailinglist/add_sub.pl 2007-09-10 05:10:04 UTC (rev 901)
@@ -109,9 +109,10 @@
Vhffs::Functions::send_mail(
$listengineconfig->{'listmaster'},
$member,
+ undef,
sprintf(gettext('[%s] You\'ve been added to the list %s'), $list->get_prefix, $list->get_localpart.'@'.$list->get_domain),
sprintf(gettext("Greetings,\n\nYou've been added to the list %s on platform %s.\n\nYou may get some help on listengine by sending an email to %s-request\@%s with subject help.\n\nCheers."), $list->get_localpart.'@'.$list->get_domain, $vhffs->get_config->get_host_name, $list->get_localpart, $list->get_domain),
- $vhffs);
+ );
}
}
Modified: trunk/vhffs-robots/src/cvs_refused.pl
===================================================================
--- trunk/vhffs-robots/src/cvs_refused.pl 2007-09-10 04:45:04 UTC (rev 900)
+++ trunk/vhffs-robots/src/cvs_refused.pl 2007-09-10 05:10:04 UTC (rev 901)
@@ -77,7 +77,7 @@
$message .= gettext("The Moderator and Admin team");
$subject = gettext("Your CVS repository request");
- Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $user->get_mail , $subject , $message );
+ Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $user->get_mail , $vhffs->get_config->get_mailtag , $subject , $message );
}
$object->delete;
Modified: trunk/vhffs-robots/src/dns_refused.pl
===================================================================
--- trunk/vhffs-robots/src/dns_refused.pl 2007-09-10 04:45:04 UTC (rev 900)
+++ trunk/vhffs-robots/src/dns_refused.pl 2007-09-10 05:10:04 UTC (rev 901)
@@ -80,7 +80,7 @@
$message .= gettext("The Moderator and Admin team");
$subject = gettext("Your DNS hosting request");
- Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $user->get_mail , $subject , $message );
+ Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $user->get_mail , $vhffs->get_config->get_mailtag , $subject , $message );
}
$object->delete;
Modified: trunk/vhffs-robots/src/group_refused.pl
===================================================================
--- trunk/vhffs-robots/src/group_refused.pl 2007-09-10 04:45:04 UTC (rev 900)
+++ trunk/vhffs-robots/src/group_refused.pl 2007-09-10 05:10:04 UTC (rev 901)
@@ -76,7 +76,7 @@
$message .= gettext("The Moderator and Admin team");
$subject = gettext("Your Group request");
- Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $user->get_mail , $subject , $message );
+ Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $user->get_mail , $vhffs->get_config->get_mailtag , $subject , $message );
}
$object->delete;
Modified: trunk/vhffs-robots/src/mail_refused.pl
===================================================================
--- trunk/vhffs-robots/src/mail_refused.pl 2007-09-10 04:45:04 UTC (rev 900)
+++ trunk/vhffs-robots/src/mail_refused.pl 2007-09-10 05:10:04 UTC (rev 901)
@@ -80,7 +80,7 @@
$message .= gettext("The Moderator and Admin team");
$subject = gettext("Your Mail hosting request");
- Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $user->get_mail , $subject , $message );
+ Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $user->get_mail , $vhffs->get_config->get_mailtag , $subject , $message );
}
$object->delete;
Modified: trunk/vhffs-robots/src/mailing.pl
===================================================================
--- trunk/vhffs-robots/src/mailing.pl 2007-09-10 04:45:04 UTC (rev 900)
+++ trunk/vhffs-robots/src/mailing.pl 2007-09-10 05:10:04 UTC (rev 901)
@@ -75,7 +75,7 @@
foreach my $user ( @{$users} )
{
next unless defined $user;
- Vhffs::Functions::send_mail( $from , $user->get_mail , $subject , $message , $vhffs );
+ Vhffs::Functions::send_mail( $from , $user->get_mail , $vhffs->get_config->get_mailtag , $subject , $message );
}
my $query = "UPDATE vhffs_mailings SET state='".Vhffs::Constants::ACTIVATED."' WHERE id_mailing='".$idm."'";
Modified: trunk/vhffs-robots/src/mailinglist_refused.pl
===================================================================
--- trunk/vhffs-robots/src/mailinglist_refused.pl 2007-09-10 04:45:04 UTC (rev 900)
+++ trunk/vhffs-robots/src/mailinglist_refused.pl 2007-09-10 05:10:04 UTC (rev 901)
@@ -77,7 +77,7 @@
$message .= gettext("Cheers,")."\n";
$message .= gettext("The Moderator and Admin team");
$subject = gettext("Your Mailing-list request");
- Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $user->get_mail , $subject , $message );
+ Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $user->get_mail , $vhffs->get_config->get_mailtag , $subject , $message );
}
$object->delete;
Modified: trunk/vhffs-robots/src/mysql_refused.pl
===================================================================
--- trunk/vhffs-robots/src/mysql_refused.pl 2007-09-10 04:45:04 UTC (rev 900)
+++ trunk/vhffs-robots/src/mysql_refused.pl 2007-09-10 05:10:04 UTC (rev 901)
@@ -51,7 +51,7 @@
$message .= gettext("The Moderator and Admin team");
$subject = gettext("Your MySQL database request");
- Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $user->get_mail , $subject , $message );
+ Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $user->get_mail , $vhffs->get_config->get_mailtag , $subject , $message );
}
$object->delete;
Modified: trunk/vhffs-robots/src/pgsql_refused.pl
===================================================================
--- trunk/vhffs-robots/src/pgsql_refused.pl 2007-09-10 04:45:04 UTC (rev 900)
+++ trunk/vhffs-robots/src/pgsql_refused.pl 2007-09-10 05:10:04 UTC (rev 901)
@@ -81,7 +81,7 @@
$message .= gettext("The Moderator and Admin team");
$subject = gettext("Your PostgreSQL database request");
- Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $user->get_mail , $subject , $message );
+ Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $user->get_mail , $vhffs->get_config->get_mailtag , $subject , $message );
}
$object->delete;
Modified: trunk/vhffs-robots/src/repository_refused.pl
===================================================================
--- trunk/vhffs-robots/src/repository_refused.pl 2007-09-10 04:45:04 UTC (rev 900)
+++ trunk/vhffs-robots/src/repository_refused.pl 2007-09-10 05:10:04 UTC (rev 901)
@@ -81,7 +81,7 @@
$message .= gettext("The Moderator and Admin team");
$subject = gettext("Your Download repository request");
- Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $user->get_mail , $subject , $message );
+ Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $user->get_mail , $vhffs->get_config->get_mailtag , $subject , $message );
}
$object->delete;
Modified: trunk/vhffs-robots/src/svn_refused.pl
===================================================================
--- trunk/vhffs-robots/src/svn_refused.pl 2007-09-10 04:45:04 UTC (rev 900)
+++ trunk/vhffs-robots/src/svn_refused.pl 2007-09-10 05:10:04 UTC (rev 901)
@@ -47,7 +47,7 @@
$message .= gettext("The Moderator and Admin team");
$subject = gettext("Your Subversion repository request");
- Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $user->get_mail , $subject , $message );
+ Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $user->get_mail , $vhffs->get_config->get_mailtag , $subject , $message );
}
$object->delete;
Modified: trunk/vhffs-robots/src/web_refused.pl
===================================================================
--- trunk/vhffs-robots/src/web_refused.pl 2007-09-10 04:45:04 UTC (rev 900)
+++ trunk/vhffs-robots/src/web_refused.pl 2007-09-10 05:10:04 UTC (rev 901)
@@ -76,7 +76,7 @@
$message .= gettext("The Moderator and Admin team");
$subject = gettext("Your hosting request");
- Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $user->get_mail , $subject , $message );
+ Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $user->get_mail , $vhffs->get_config->get_mailtag , $subject , $message );
}
$object->delete;