Permalink
Browse files

Starting a program to deactivate a group.

  • Loading branch information...
1 parent 1c5b31b commit 00260b9a68d2c9dd4abb7bbeeddd0bd7e5136822 @jhannah jhannah committed Jun 28, 2013
Showing with 43 additions and 0 deletions.
  1. +43 −0 bin/deactivate.pl
View
@@ -0,0 +1,43 @@
+use 5.18.0;
+use Email::Stuffer;
+
+send_email('Omaha.pm', 'http://omaha.pm.org', 'jay@jays.net');
+
+
+sub send_email {
+ my ($group, $homepage, $leader_email) = @_;
+
+ $leader_email = 'jay@jays.net'; # temporary
+
+ my $body = <<EOT;
+<p>
+$group leader,
+</p><p>
+It appears that your Perl Mongers group configuration is broken,
+badly out of date, or has been overrun with spam:
+</p><p>
+ $homepage
+</p><p>
+Your group has been deactivated.
+</p><p>
+When you have resolved the problem(s), please reply to this email
+informing us of your resolutions so that we can re-activate you.
+</p><p>
+Thank you for your attention!
+</p><p>
+pm.org support staff<br/>
+support\@pm.org
+</p>
+EOT
+
+ # Create and send the email in one shot
+ Email::Stuffer
+ ->from ('support@pm.org')
+ ->to ($leader_email)
+ ->subject ("$group deactivated")
+ ->html_body($body)
+ ->send;
+}
+
+
+

0 comments on commit 00260b9

Please sign in to comment.