summaryrefslogtreecommitdiff
path: root/includes/helper/email_helper.php
diff options
context:
space:
mode:
authorBot <bot@myigel.name>2017-01-03 03:22:48 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2017-01-03 03:22:48 +0100
commit356b2582f3e6a43ecf2607acad4a7fe0b37f659a (patch)
treee02c9214b23a0b9ec33aa725db962d565bd30a82 /includes/helper/email_helper.php
parentd71e7bbfad2f07f82df0c515608996d250fd4182 (diff)
PPHDoc, formatting, fixes, cleanup
Diffstat (limited to 'includes/helper/email_helper.php')
-rw-r--r--includes/helper/email_helper.php25
1 files changed, 23 insertions, 2 deletions
diff --git a/includes/helper/email_helper.php b/includes/helper/email_helper.php
index 35bdbc9a..18203ecb 100644
--- a/includes/helper/email_helper.php
+++ b/includes/helper/email_helper.php
@@ -1,5 +1,12 @@
<?php
+/**
+ * @param array $recipient_user
+ * @param string $title
+ * @param string $message
+ * @param bool $not_if_its_me
+ * @return bool
+ */
function engelsystem_email_to_user($recipient_user, $title, $message, $not_if_its_me = false)
{
global $user;
@@ -16,14 +23,28 @@ function engelsystem_email_to_user($recipient_user, $title, $message, $not_if_it
. _("This email is autogenerated and has not to be signed. You got this email because you are registered in the engelsystem.");
gettext_locale();
+
return engelsystem_email($recipient_user['email'], $title, $message);
}
+/**
+ * @param string $address
+ * @param string $title
+ * @param string $message
+ * @return bool
+ */
function engelsystem_email($address, $title, $message)
{
- $result = mail($address, $title, $message,
- "Content-Type: text/plain; charset=UTF-8\r\nFrom: Engelsystem <noreply@engelsystem.de>");
+ $result = mail(
+ $address,
+ $title,
+ $message,
+ "Content-Type: text/plain; charset=UTF-8\r\nFrom: Engelsystem <noreply@engelsystem.de>"
+ );
+
if ($result === false) {
engelsystem_error('Unable to send email.');
}
+
+ return true;
}