]> git.mxchange.org Git - mailer.git/blobdiff - inc/email-functions.php
Continued:
[mailer.git] / inc / email-functions.php
index a793b45e7859eaa437e887fc9269292b85fade2a..87eab21d5cbba90c1c6a4eeb00ece1ecfb1ba9a8 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Mailversand bezogene Funktionen                  *
  * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2016 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -50,7 +45,7 @@ function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = '
        } // END - if
 
        // Set from header
-       if ((!isInString('@', $toEmail)) && ($toEmail > 0)) {
+       if ((!isInString('@', $toEmail)) && (isValidId($toEmail))) {
                // Does the user exist?
                if ((isExtensionActive('user')) && (fetchUserData($toEmail))) {
                        // Get the email
@@ -143,7 +138,7 @@ function sendRawEmail ($toEmail, $subject, $message, $headers) {
                $mail->CharSet = 'UTF-8';
 
                // Path for PHPMailer
-               $mail->PluginDir  = sprintf("%sinc/phpmailer/", getPath());
+               $mail->PluginDir  = sprintf('%sinc/phpmailer/', getPath());
 
                $mail->IsSMTP();
                $mail->SMTPAuth   = TRUE;
@@ -192,7 +187,7 @@ function sendRawEmail ($toEmail, $subject, $message, $headers) {
 }
 
 // Send notification to admin
-function sendAdminNotification ($subject, $templateName, $content = array(), $userid = NULL) {
+function sendAdminNotification ($subject, $templateName, $content = [], $userid = NULL) {
        if ((isExtensionInstalledAndNewer('admins', '0.4.1')) && (function_exists('sendAdminsEmails'))) {
                // Send new way
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'admins=Y,subject=' . $subject . ',templateName=' . $templateName . ' - OKAY!');