summaryrefslogtreecommitdiff
path: root/Postman/notifications/PostmanMailNotify.php
blob: 922c30446b0998191fcec7325189dc5c2fcfdc99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly
}
class PostmanMailNotify implements Postman_Notify {

    public function send_message($message)
    {
        $to_email = apply_filters( 'post_smtp_notify_email',get_bloginfo( 'admin_email' ) );
        $domain = get_bloginfo( 'url' );

        mail( $to_email, "{$domain}: " .  __( 'Post SMTP email error', 'post-smtp' ), $message , '', "-f{$to_email}" );
    }
}