PluginProbe
SureMail – SMTP and Email Logs Plugin with Amazon SES, Postmark, and Other Providers / 0.0.4
SureMail – SMTP and Email Logs Plugin with Amazon SES, Postmark, and Other Providers v0.0.4
2.0.2 2.0.1 2.0.0 1.9.5 trunk 0.0.4 0.0.5 0.0.6 1.0.0 1.0.1 1.1.0 1.2.0 1.3.0 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 1.6.1 1.6.2 1.7.0 1.7.1 1.7.2 1.8.0 1.8.1 All 31 releases
suremails / suremails.php

suremails.php in SureMail – SMTP and Email Logs Plugin with Amazon SES, Postmark, and Other Providers 0.0.4, at suremails.php

50 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: SureMails
4 * Plugin URI: https://suremails.com
5 * Description: A plugin to connect and send emails via SMTP connections.
6 * Author: SureMails
7 * Author URI: https://suremails.com/
8 * Version: 0.0.4
9 * License: GPLv2 or later
10 * Text Domain: suremails
11 * Requires at least: 5.4
12 * Requires PHP: 7.4
13 *
14 * @package suremails
15 */
16
17 if ( ! defined( 'ABSPATH' ) ) {
18 exit; // Exit if accessed directly.
19 }
20
21 define( 'SUREMAILS_FILE', __FILE__ );
22 define( 'SUREMAILS_BASE', plugin_basename( SUREMAILS_FILE ) );
23 define( 'SUREMAILS_DIR', plugin_dir_path( SUREMAILS_FILE ) );
24 define( 'SUREMAILS_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
25 define( 'SUREMAILS_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
26 define( 'SUREMAILS_VERSION', '0.0.4' );
27 define( 'SUREMAILS', 'suremails' );
28
29 require_once SUREMAILS_DIR . 'loader.php'; // Include the Loader file.
30
31 require_once SUREMAILS_DIR . 'inc/utils/emails/handler/mail-handler.php';
32
33 // Define wp_mail if it does not exist.
34 if ( ! function_exists( 'wp_mail' ) ) {
35 /**
36 * Override the wp_mail function to use the SureMails MailHandler.
37 *
38 * @param string|array $to Recipient email address(es).
39 * @param string $subject Email subject.
40 * @param string $message Email message.
41 * @param string|array $headers Optional. Additional headers.
42 * @param array $attachments Optional. Attachments.
43 * @return bool|null Whether the email was sent successfully.
44 */
45 function wp_mail( $to, $subject, $message, $headers = '', $attachments = [] ) {
46 $atts = apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) );
47 return SureMails\Inc\Utils\Emails\Handler\MailHandler::handle_mail( $atts );
48 }
49 }
50