From a501edf5ed53258ea5785aee47ebc5c11acafaaf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jonas=20H=C3=A4ggqvist?= Date: Tue, 17 Mar 2009 22:47:58 +0100 Subject: [PATCH] Separate emailing into its own function. --- private/themesite.class.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/private/themesite.class.php b/private/themesite.class.php index b3be852..1f5be13 100644 --- a/private/themesite.class.php +++ b/private/themesite.class.php @@ -238,6 +238,12 @@ class themesite { } } + private function send_mail($subject, $to, $msg) { + $msg = wordwrap($msg, 78); + $headers = 'From: themes@rockbox.org'; + mail($to, $subject, $msg, $headers); + } + public function validatetheme($zipfile) { $err = array(); return $err; @@ -264,11 +270,9 @@ Thank for your contributions The Rockbox Theme Site team. END; /* ' (this is here to keep my syntax hilighting happy) */ - $msg = wordwrap($msg, 78); $subject = "Rockbox Theme Site email verification"; $to = sprintf("%s <%s>", $author, $email); - $headers = 'From: themes@rockbox.org'; - mail($to, $subject, $msg, $headers); + $this->send_mail($subject, $to, $msg); } public function verifyemail($token) { -- 2.11.4.GIT