Rev 1116 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1116 | Rev 1186 | ||
---|---|---|---|
Line 27... | Line 27... | ||
27 | 27 | ||
28 | /** |
28 | /** |
29 | * @param string $email |
29 | * @param string $email |
30 | * @return bool |
30 | * @return bool |
31 | */ |
31 | */ |
32 | public static function validMailAddress(string $email): bool { |
32 | public function validMailAddress(string $email): bool { |
33 | return !empty(filter_var($email, FILTER_VALIDATE_EMAIL)); |
33 | return !empty(filter_var($email, FILTER_VALIDATE_EMAIL)); |
34 | } |
34 | } |
35 | 35 | ||
36 | /** |
36 | /** |
37 | * @param string $email |
37 | * @param string $email |
38 | * @param string $linktext |
38 | * @param string $linktext |
39 | * @param int $level |
39 | * @param int $level |
40 | * @return string|null |
40 | * @return string|null |
41 | */ |
41 | */ |
42 | public static function secureEmailAddress(string $email, string $linktext, int $level=1)/*: ?string*/ { |
42 | public function secureEmailAddress(string $email, string $linktext, int $level=1)/*: ?string*/ { |
43 | 43 | ||
44 | // see http://www.spamspan.de/ |
44 | // see http://www.spamspan.de/ |
45 | 45 | ||
46 | /* Level 1 */ |
46 | /* Level 1 */ |
47 | /* |
47 | /* |
Line 155... | Line 155... | ||
155 | * @param string $bcc |
155 | * @param string $bcc |
156 | * @return void |
156 | * @return void |
157 | * @throws OIDplusException |
157 | * @throws OIDplusException |
158 | * @throws OIDplusMailException |
158 | * @throws OIDplusMailException |
159 | */ |
159 | */ |
160 | public static function sendMail(string $to, string $title, string $msg, string $cc='', string $bcc='') { |
160 | public function sendMail(string $to, string $title, string $msg, string $cc='', string $bcc='') { |
161 | $h = new \SecureMailer(); |
161 | $h = new \SecureMailer(); |
162 | 162 | ||
163 | // DM 14.04.2022: Added Reply-To, because some servers might change the 'From' attribute (Anti-Spoof?) |
163 | // DM 14.04.2022: Added Reply-To, because some servers might change the 'From' attribute (Anti-Spoof?) |
164 | $h->addHeader('From', OIDplus::config()->getValue('admin_email')); |
164 | $h->addHeader('From', OIDplus::config()->getValue('admin_email')); |
165 | $h->addHeader('Reply-To', OIDplus::config()->getValue('admin_email')); |
165 | $h->addHeader('Reply-To', OIDplus::config()->getValue('admin_email')); |