Defining SMTP.com Mailer Constants

/* Defining SMTP.com Mailer Constants * * Original doc: https://wpmailsmtp.com/docs/how-to-secure-smtp-settings-by-using-constants/ */ define( ‘WPMS_SMTPCOM_API_KEY’, ” ); define( ‘WPMS_SMTPCOM_CHANNEL’, ” ); define( ‘WPMS_MAILER’, ‘smtpcom’ );Continue reading

Defining SendLayer Mailer Constants

/* Defining SendLayer Mailer Constants * * Original doc: https://wpmailsmtp.com/docs/how-to-secure-smtp-settings-by-using-constants/ */ define( ‘WPMS_MAILER’, ‘sendlayer’ ); define( ‘WPMS_SENDLAYER_API_KEY’, ” );Continue reading

Defining Email Log Constants

/* Defining Email Log Constants * * Original doc: https://wpmailsmtp.com/docs/how-to-secure-smtp-settings-by-using-constants/ */ define ( ‘WPMS_LOGS_ENABLED’, true ); // True turns it on, false turns it off. define ( ‘WPMS_LOGS_LOG_EMAIL_CONTENT’, true ); // True turns it on and stores email content, false…Continue reading

Defining General Settings Constants

/* Defining General Settings Constants * * Original doc: https://wpmailsmtp.com/docs/how-to-secure-smtp-settings-by-using-constants/ */ define( ‘WPMS_LICENSE_KEY’, ” ); define( ‘WPMS_MAIL_FROM’, ‘[email protected]’ ); define( ‘WPMS_MAIL_FROM_FORCE’, true ); // True turns it on, false turns it off. define( ‘WPMS_MAIL_FROM_NAME’, ‘Example Name’ ); define( ‘WPMS_MAIL_FROM_NAME_FORCE’, true…Continue reading

Define the Mailgun Signing Key Constant

/* 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

/* 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

WP Simple Pay: Remove Card Terms

/** * @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

/* 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 Text Fields

/* 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