Skip Navigation

[Résolu] CRED/form emails to author all going to the one/the same author!

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem: I have email notifications set to be sent to the post author. When multiple emails are sent at the same time, the emails are sent to the wrong author.

Solution: Update to the latest version of Forms.

This support ticket is created Il y a 6 années et 4 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Ce sujet contient 11 réponses, a 2 voix.

Dernière mise à jour par julieP Il y a 6 années et 2 mois.

Assisté par: Christian Cox.

Auteur
Publications
#1072579

Can this one be allocated to either Christian or Nigel please?

I've encountered an issue on a dev site where email notifications (on a child post with post expiry set) are all going to one post author.

To rule out any potential conflicts, I've created a new, very basic site that only uses plugins Types, Access, Views, Forms, Classic Editor & Easy SMTP. My theme is Astra. There are two post types with a one to many relationship. The child post is set to expire and has two notifications, one to site admin and the other to the post author. There are two users. Each has one parent post and two child posts (connected to the parent post they created). The emails are going to site admin OK but all the emails intended for the authors are going to just one of the authors. I've enabled Easy SMTP's logging feature and this confirms the behaviour.

To make it easier to see which email should have been received by which user, I added the %%POST_TITLE%% code in the subject lines and [wpv-post-title], [wpv-post-author format="meta" meta="user_login"] & [wpv-post-author format="meta" meta="user_email"] to the body. The wpv shortcodes are not returning any values but the subject codes are.

I can't provide any links or access for you to test on my install because this is a dev site that is completely locked down. I do however have two sets of file/database dumps I can provide for you to test locally (one uses theme Astra & the other 2017 so you can see the issue is present with both).

Thanks

#1074351

Hi, the issue with SMTP plugins is that they override the wp_mail function in a way that Toolset Forms cannot control. Typically, an SMTP plugin requires you to set up a single "from" email address and provide login credentials for that email account. Then it sends all the emails from that account. Forms can't change that behavior, because the SMTP plugin overrides the wp_mail process after Forms has set up the "from" address, and overrides it with the SMTP plugin's settings. Any plugin that hijacks wp_mail like this is incompatible with Forms email notifications for this reason.

Can you test without the SMTP plugin active to see if the behavior is different?

#1076090

Hi Christian

Many thanks for picking this one up.

I've been using Easy SMTP plugin alongside Toolset Forms successfully on a live site for over 2 years now and am not experiencing any issues there currently (none of the posts on that site have post expiry enabled).

After a lot more testing yesterday on my dev site, I'm confident the issue is with posts with expiry enabled. I've tested email notifications with and without Easy SMTP activated and in both cases tested notifications on form submission and X hours before expiry on posts with and posts without a one-to-many relationship. The emails are behaving the same whether via wp_mail or using Easy SMTP (i.e. all going to one of the two users). I have also noticed that all emails for the 'parent' post are going to the one user and all emails for the 'child' post are going to the other.

We need to not forget or overlook that wpv shortcodes are not returning values when the emails are delivered for posts with expiry set (body or subject codes like %%POST_TITLE%% are fine).

I'm particularly concerned about this issue as it has major ramifications from a GDPR point of view; emails going to the wrong recipients could constitute a data protection breach depending on the content and this type of issue could very easily go unnoticed by website owners.

If you'd like to see the SMTP logs, screenshots of the emails sent using wp_mail and/or a copy of the site, please enable private fields.

Thank you.

#1076487

Okay I'll be glad to test this out using the file and database dumps you mentioned. I will activate private reply fields here so you can share a download link. The fields may say "Duplicator" but any download link will be accepted.

#1077568

Thank you, please give me some time to investigate the notifications and I will get back to you as soon as possible.

#1077655

Okay thanks for your patience. I was able to replicate this issue on my local environment using your data, and also on a clean site installation. So I think I have everything I need to escalate this to my 2nd tier support team for further investigation. Please stand by and I will update you when I have some feedback.

#1078313

Thanks Christian. Do you still need the links I provided to work or can I now delete the files from google drive?

#1078470

Feel free to delete those, we are able to reproduce the issue consistently after identifying the problem.

#1093041

Our developers have let me know that this issue will be fixed in the next release of Forms. I will keep you posted here as I receive more information about delivery of the next version.

#1099563

Hi, please find Forms 2.1 available now for automatic update or download. This version includes a fix for the notification recipient problem you experienced.

#1103280

Thanks for the update Christian; I'll be upgrading and testing over the next few days. Will report my findings (please leave ticket open in the meantime).

Thank you!

#1103657

Hi Christian

Have tested and am pleased to confirm this issue is now resolved. Thanks for your assistance.