| @@ 760-782 (lines=23) @@ | ||
| 757 | $email = $faqConfig->get('main.administrationMail'); |
|
| 758 | } |
|
| 759 | ||
| 760 | if (!is_null($author) && !empty($author) && !is_null($email) && !empty($email) && !is_null($question) && |
|
| 761 | !empty($question) && $stopWords->checkBannedWord(Strings::htmlspecialchars($question))) { |
|
| 762 | $question = sprintf( |
|
| 763 | "%s %s\n%s %s\n\n %s", |
|
| 764 | $PMF_LANG['msgNewContentName'], |
|
| 765 | $author, |
|
| 766 | $PMF_LANG['msgNewContentMail'], |
|
| 767 | $email, |
|
| 768 | $question |
|
| 769 | ); |
|
| 770 | ||
| 771 | $mail = new Mail($faqConfig); |
|
| 772 | $mail->setReplyTo($email, $author); |
|
| 773 | $mail->addTo($faqConfig->get('main.administrationMail')); |
|
| 774 | $mail->subject = 'Feedback: %sitename%'; |
|
| 775 | $mail->message = $question; |
|
| 776 | $result = $mail->send(); |
|
| 777 | unset($mail); |
|
| 778 | ||
| 779 | $message = array('success' => $PMF_LANG['msgMailContact']); |
|
| 780 | } else { |
|
| 781 | $message = array('error' => $PMF_LANG['err_sendMail']); |
|
| 782 | } |
|
| 783 | break; |
|
| 784 | ||
| 785 | // Send mails to friends |
|
| @@ 932-956 (lines=25) @@ | ||
| 929 | $email = $faqConfig->get('main.administrationMail'); |
|
| 930 | } |
|
| 931 | ||
| 932 | if (!is_null($author) && !empty($author) && !is_null($email) && !empty($email) && !is_null($question) && |
|
| 933 | !empty($question) && $stopWords->checkBannedWord(Strings::htmlspecialchars($question))) { |
|
| 934 | $question = sprintf( |
|
| 935 | "%s %s\n%s %s\n%s %s\n\n %s", |
|
| 936 | $PMF_LANG['ad_user_loginname'], |
|
| 937 | $loginName, |
|
| 938 | $PMF_LANG['msgNewContentName'], |
|
| 939 | $author, |
|
| 940 | $PMF_LANG['msgNewContentMail'], |
|
| 941 | $email, |
|
| 942 | $question |
|
| 943 | ); |
|
| 944 | ||
| 945 | $mail = new Mail($faqConfig); |
|
| 946 | $mail->setReplyTo($email, $author); |
|
| 947 | $mail->addTo($faqConfig->get('main.administrationMail')); |
|
| 948 | $mail->subject = 'Remove User Request: %sitename%'; |
|
| 949 | $mail->message = $question; |
|
| 950 | $result = $mail->send(); |
|
| 951 | unset($mail); |
|
| 952 | ||
| 953 | $message = ['success' => $PMF_LANG['msgMailContact']]; |
|
| 954 | } else { |
|
| 955 | $message = ['error' => $PMF_LANG['err_sendMail']]; |
|
| 956 | } |
|
| 957 | break; |
|
| 958 | } |
|
| 959 | ||