First of all awesome plugin! Love what you’ve done with it, it’s easy to understand and work with.
I have a small problem though, the welcome mail I’ve set up with your plugin is often times being sent to the spam folder. I bought an SMTP hosting from my host provider and set it up with WP Mail SMTP, and the emails are delivered correctly (not in the spam folder).
What I’m trying to figure out is, is Ultimate Member interfeering with email sending process? I saw in the code that the email is sent via the wp_mail() funcion, which means it should work with WP Mail SMTP (WP Mail SMTP transforms this function and sends SMTP email – ”?We reconfigure the?wp_mail()?function to either use proper SMTP host credentials or leverage a built-in SMTP mail provider.”).
Am I missing something?
Thank you for your time and help in advance!
The page I need help with: [log in to see the link]
Yes, the Ultimate Member plugin uses the wp_mail() function to send emails. This is a native WordPress function. All SMTP plugins must be compatible with this function. The WP Mail SMTP is a popular SMTP plugin, a lot of customers use this plugin with Ultimate Member.
Ultimate Member sets mail headers “From” and “Content-Type”, please don’t override these headers via SMTP plugin. The “From” header depends on the Mail appears from and Mail appears from address settings. The “Content-Type” header depends on the Use HTML for E-mails? setting.
WordPress uses PHP function mail() to send emails if there is no SMTP plugin. This function uses a built-in mail server to send emails. Emails may be sent to the spam folder if something is wrong with the built-in mail server. Spam checking algorithms are complex and take into account many factors. Sometimes it is difficult to determine what exactly led to it ending up in spam.
Indeed WP Mail SMTP plugin inforces the “From email” and “From name”, so I disabled that. Sadly that didn’t fix the email going to spam issue.
I did however manage to get logs of the welcome email being sent from Ultimate Memebr (logs are from WP Mail SMTP plugin) and I’m hoping you could assist me in debugging ??
First thing I noticed is that there are 2 identical email requests from ultimate member after the user registered (is this normal behaviour).
Now looking at the logs this is what I see:
Ultimate Member
/var/www/clients/client98/web261/web/wp-content/plugins/ultimate-member/includes/core/class-mail.php (line: 459)
Backtrace: [0] wp_mail called at [/var/www/clients/client98/web261/web/wp-content/plugins/ultimate-member/includes/core/class-mail.php:459] [1] um\core\Mail->send called at [/var/www/clients/client98/web261/web/wp-content/plugins/ultimate-member/includes/core/class-user.php:1767] [2] um\core\User->approve called at [/var/www/clients/client98/web261/web/wp-content/plugins/ultimate-member/includes/core/um-actions-register.php:14] [3] um_post_registration_approved_hook called at [/var/www/clients/client98/web261/web/wp-includes/class-wp-hook.php:312] [4] WP_Hook->apply_filters called at [/var/www/clients/client98/web261/web/wp-includes/class-wp-hook.php:334] [5] WP_Hook->do_action called at [/var/www/clients/client98/web261/web/wp-includes/plugin.php:517] [6] do_action called at [/var/www/clients/client98/web261/web/wp-content/plugins/ultimate-member/includes/core/um-actions-register.php:177] [7] um_check_user_status called at [/var/www/clients/client98/web261/web/wp-includes/class-wp-hook.php:310] [8] WP_Hook->apply_filters called at [/var/www/clients/client98/web261/web/wp-includes/class-wp-hook.php:334] [9] WP_Hook->do_action called at [/var/www/clients/client98/web261/web/wp-includes/plugin.php:517] [10] do_action called at [/var/www/clients/client98/web261/web/wp-content/plugins/ultimate-member/includes/core/um-actions-register.php:114] [11] um_after_insert_user called at [/var/www/clients/client98/web261/web/wp-includes/class-wp-hook.php:310] [12] WP_Hook->apply_filters called at [/var/www/clients/client98/web261/web/wp-includes/class-wp-hook.php:334] [13] WP_Hook->do_action called at [/var/www/clients/client98/web261/web/wp-includes/plugin.php:517] [14] do_action called at [/var/www/clients/client98/web261/web/wp-content/plugins/ultimate-member/includes/core/um-actions-register.php:548] [15] um_submit_form_register called at [/var/www/clients/client98/web261/web/wp-includes/class-wp-hook.php:310] [16] WP_Hook->apply_filters called at [/var/www/clients/client98/web261/web/wp-includes/class-wp-hook.php:334] [17] WP_Hook->do_action called at [/var/www/clients/client98/web261/web/wp-includes/plugin.php:517] [18] do_action called at [/var/www/clients/client98/web261/web/wp-content/plugins/ultimate-member/includes/core/class-form.php:699] [19] um\core\Form->form_init called at [/var/www/clients/client98/web261/web/wp-includes/class-wp-hook.php:310] [20] WP_Hook->apply_filters called at [/var/www/clients/client98/web261/web/wp-includes/class-wp-hook.php:334] [21] WP_Hook->do_action called at [/var/www/clients/client98/web261/web/wp-includes/plugin.php:517] [22] do_action called at [/var/www/clients/client98/web261/web/wp-includes/template-loader.php:13] [23] require_once called at [/var/www/clients/client98/web261/web/wp-blog-header.php:19] [24] require called at [/var/www/clients/client98/web261/web/index.php:17]
Is there something in these logs that might lead to the problem? Or am I shooting in the dark?
Try to investigate the mail sent to the spam folder in Gmail. You’ll see the “Why is this message in spam?” section with a reason to identify this mail as spam. You also can use “Show original” to see all mail data. Look at the SPF, DKIM and DMARC authentication results. Sometimes you may find a hint in the mail headers.