/* Define the Mailgun Signing Key Constant * * Original doc: https://wpmailsmtp.com/docs/how-wp-mail-smtp-verifies-email-delivery/ */ // Replace your-signing-key-here with your actual key define( ‘WPMS_MAILGUN_WEBHOOK_SIGNING_KEY’, ‘your-signing-key-here’ );Continue reading
/* Adding a Custom Filter when using Other SMTP Setting * * Original doc: https://wpmailsmtp.com/docs/how-to-set-up-the-other-smtp-mailer-in-wp-mail-smtp/ */ add_filter( ‘wp_mail_smtp_custom_options’, function( $phpmailer ) { $phpmailer->AuthType = ‘LOGIN’; return $phpmailer; } );Continue reading
/** * @link https://library.wpcode.com/snippet/qor69dxo/ */ add_filter( ‘simpay_payment_element_config’, function( $element ) { $element[‘terms’] = array( ‘card’ => ‘never’, ); return $element; } );Continue reading
/* Re-route BuddyPress emails through WP Mail SMTP * * Original doc: https://wpmailsmtp.com/buddypress-activation-email-notifications/ */ // Set BP to use wp_mail add_filter( ‘bp_email_use_wp_mail’, ‘__return_true’ ); // Set messages to HTML for BP sent emails. add_filter( ‘wp_mail_content_type’, function( $default ) { if…Continue reading
/* Block URLs inside Single Line and Paragraph Text Fields on WPForms * * Original doc: https://wpmailsmtp.com/how-to-stop-contact-form-spam-in-wordpress/ */ /* * Block URLs from inside form on Single Line Text and Paragraph Text form fields * * @link https://wpforms.com/developers/how-to-block-urls-inside-the-form-fields/ */ function…Continue reading
/* Emails via two different Postmark streams based on the email subject * * Original doc: https://wpmailsmtp.com/docs/how-to-set-up-the-postmark-mailer-in-wp-mail-smtp/ */ // Conditionally set a Postmark mailer message stream in WP Mail SMTP add_filter( ‘wp_mail_smtp_providers_mailer_get_body’, function ( $body, $mailer ) { if (…Continue reading
/* Change the redirect URI when using Google App’s OAuth * * Original doc: https://wpmailsmtp.com/docs/how-to-set-up-the-gmail-mailer-in-wp-mail-smtp/ */ add_filter( ‘wp_mail_smtp_providers_gmail_auth_use_self_oauth_redirect_url’, ‘__return_true’ );Continue reading
/* Using an Office 365 GCC or DoD email address * * Original doc: https://wpmailsmtp.com/docs/how-to-set-up-the-outlook-mailer-in-wp-mail-smtp/ */ function theme_prefix_enable_gcc_high_and_dod_compatibility( $country_code ) { add_filter( ‘wp_mail_smtp_pro_providers_outlook_auth_authorize_url’, function ( $url ) use ( $country_code ) { return str_replace( ‘microsoftonline.com’, ‘microsoftonline.’ . $country_code, $url );…Continue reading
/* Hide Your Identity For Amazon SES Mailer Setup * * Original doc: https://wpmailsmtp.com/docs/hiding-your-identity-for-amazon-ses-mailer-setup/ */ define( ‘WPMS_AMAZONSES_DISPLAY_IDENTITIES’, false );Continue reading
/* Hide the Email Test Menu Item in Settings * * Original doc: https://wpmailsmtp.com/docs/hiding-the-email-test-menu-item-in-settings/ */ add_filter( ‘wp_mail_smtp_admin_get_pages’, function ( $pages ) { unset( $pages[ ‘test’ ] ); return $pages; }, PHP_INT_MAX );Continue reading