Rev 875 | Rev 1086 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 875 | Rev 1050 | ||
---|---|---|---|
Line 15... | Line 15... | ||
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
16 | * See the License for the specific language governing permissions and |
16 | * See the License for the specific language governing permissions and |
17 | * limitations under the License. |
17 | * limitations under the License. |
18 | */ |
18 | */ |
19 | 19 | ||
20 | if (!defined('INSIDE_OIDPLUS')) die(); |
20 | namespace ViaThinkSoft\OIDplus; |
21 | 21 | ||
22 | class OIDplusMailUtils extends OIDplusBaseClass { |
22 | class OIDplusMailUtils extends OIDplusBaseClass { |
23 | 23 | ||
24 | public static function validMailAddress($email) { |
24 | public static function validMailAddress($email) { |
25 | return !empty(filter_var($email, FILTER_VALIDATE_EMAIL)); |
25 | return !empty(filter_var($email, FILTER_VALIDATE_EMAIL)); |
Line 132... | Line 132... | ||
132 | 132 | ||
133 | */ |
133 | */ |
134 | } |
134 | } |
135 | 135 | ||
136 | public static function sendMail($to, $title, $msg, $cc='', $bcc='') { |
136 | public static function sendMail($to, $title, $msg, $cc='', $bcc='') { |
137 | $h = new SecureMailer(); |
137 | $h = new \SecureMailer(); |
138 | 138 | ||
139 | // DM 14.04.2022: Added Reply-To, because some servers might change the 'From' attribute (Anti-Spoof?) |
139 | // DM 14.04.2022: Added Reply-To, because some servers might change the 'From' attribute (Anti-Spoof?) |
140 | $h->addHeader('From', OIDplus::config()->getValue('admin_email')); |
140 | $h->addHeader('From', OIDplus::config()->getValue('admin_email')); |
141 | $h->addHeader('Reply-To', OIDplus::config()->getValue('admin_email')); |
141 | $h->addHeader('Reply-To', OIDplus::config()->getValue('admin_email')); |
142 | 142 |