Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Post By Email: From/Reply-To Address
Avatar
chris.crabtree
Member
Free Members
sp_UserOfflineSmall Offline
Jan 22, 2013 - 11:00 pm

Ah, that makes more sense. I was already headed down that same path, in fact. :-)

Seems to do the trick! Here's the header from and reply-to:

From: Phit-N-Phat <tech.support.issues@phit-n-phat.mailgun.org>
Reply-To: tech.support.issues@phit-n-phat.mailgun.org

I wonder whether sp_emailpost_replyto() should call sp_emailpost_newpost() to grab the forum e-mail address, or whether we can count on it being populated already in all cases? It certainly is populated in this case, so that's good definitely.

And still something is not right with the filters because the reply instructions get doubled somewhere along the line (e.g.):
[-- To reply by email insert your text above this line - instructions below --]


[-- To reply by email insert your text above this line - instructions below --]

New post on a forum or topic you are subscribed to at Phit-N-Phat:

From: The King
Group: Tech Support
Forum: Issues
Topic: Testing #5621
URL: http://www.phit-n-phat.com/forum/issues/testing-5621/#p3859

Post:
asdf


To unsubscribe, please visit your profile: http://www.phit-n-phat.com/forum/profile/?ptab=subscriptions&pmenu=topic-subscriptions




* To post a reply by email * - please remove all old text from ABOVE the insert line at the top and enter your plain text reply above it. Do not remove ANY of this email text. Please remember that your reply may not appear immediately in the forum

* To start a new topic in this forum * - send your email to  mailto:tech.support.issues@phit-n-phat.mailgun.org. The subject name will become the new topic title

[--id=#testing-5621#--]



* To post a reply by email * - please remove all old text from ABOVE the insert line at the top and enter your plain text reply above it. Do not remove ANY of this email text. Please remember that your reply may not appear immediately in the forum

* To start a new topic in this forum * - send your email to  mailto:tech.support.issues@phit-n-phat.mailgun.org. The subject name will become the new topic title

[--id=#testing-5621#--]

Avatar
chris.crabtree
Member
Free Members
sp_UserOfflineSmall Offline
Jan 22, 2013 - 11:12 pm

I think I see why it's doubling.

In sp-email-post-plugin.php, it has 'sp_emailpost_add_email_link' being called on two different filter tags:

add_filter('sph_admin_email', 'sp_emailpost_add_email_link', 10, 3);
add_filter('sph_subscriptions_notification_email', 'sp_emailpost_add_email_link', 10, 3);

So if you're subscribed and an admin, you get the double "To reply by email insert your text above this line - instructions below" message.

Thinking it would be more foolproof to teach sp_emailpost_do_add_email_link() to test that it hasn't already done its job before adding the top and bottom text again than to troubleshoot multiple paths through multiple filters for users in multiple roles.

Maybe it's as easy as testing the top of the message for the exact match? Not sure.

thanks!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jan 22, 2013 - 11:23 pm

if you are an admin receiving new post notifications, why would you subscribe to topics?? sorry, dont understand that logic.. ;)

if you just want to watch a topic and not subscribe, then use the watches plugin and watch it...

Avatar
chris.crabtree
Member
Free Members
sp_UserOfflineSmall Offline
Jan 22, 2013 - 11:37 pm

As an admin, I actually only subscribe to the tech support forum and so I don't get admin new post notifications. But because I am an admin and a subscriber, the filter is doubling the insertion points in the message (even though I don't actually get admin notifications of new posts).

In any case, I would think it would be a good safeguard to have just in case a user ever ended up in a dual role where he might receive a notification in either role and will see this same doubling behavior.

But I suppose I can live with it if you guys don't think it worth fixing. Thanks!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 23, 2013 - 5:00 am

OH my... that's an awful lot to read through and make sense of before the caffeine kicks in!

Can I recap? As far as I can see there seem to be two issues. A filter in the subscriptions plugin that seems to have been knocked off course recently is that correct? You and Steve appear to have a fix in place for that so we need to investigate why it changed here and correct it for the next update.

And multiple 'headers' in the email because you are an 'Admin', a 'Moderator' and a 'Subscriber'. Yes? Well Steve is right in asking why would you subscribe if you also get Admin notifications. And I actually DO think this is a hole worth plugging and believe the is actually a ticket opened in our system for this. If not I will open one.

It is the 'Moderator' part that I am curious about. Does this mean that you, as a forum 'Admin' have become a member of a 'moderators' user group? If we allow that then again - I suspect something has been knocked we need to fix as well.

andy-signature.png
YELLOW
SWORDFISH
Avatar
chris.crabtree
Member
Free Members
sp_UserOfflineSmall Offline
Jan 23, 2013 - 9:11 am

Yes, I think this recap is accurate.

To clarify the roles of my test account that is getting the double headers, here is the situation. I muddied the waters on this for sure, as I was confused as well.

The user is a WP Admin and a SP Moderator. The user is NOT a SPF Admin.

I made that user a SP Moderator so that I could test Moderators-only being able to Reply via email as part of testing PBE. Eventually it won't matter, as every user will have PBE capabilities, but I didn't want to turn it on for them until I had it all working.

So I'm not sure that part of it is really an issue or not. The main thing seems to be that a check for pre-existing PBE tags is in order before inserting more of them.

Thanks!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 23, 2013 - 12:11 pm

So can we double check on that last point. Has the moderator user account turned on admin email notifications (Your Admin Options)? I would assume yes but need to check please.

andy-signature.png
YELLOW
SWORDFISH
Avatar
chris.crabtree
Member
Free Members
sp_UserOfflineSmall Offline
Feb 1, 2013 - 9:52 pm

Under Your Admin Options, I only have one option checked: Receive notification (within forum - not email) on topic/post edits.

Does that answer the question?

Thanks!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 2, 2013 - 4:32 am

Ok so even more confused now! So were there multiple headers in the email because you, as an admin, had also subscribed to that topic? Is that all we are talking about?

andy-signature.png
YELLOW
SWORDFISH
Avatar
chris.crabtree
Member
Free Members
sp_UserOfflineSmall Offline
Feb 3, 2013 - 3:21 pm

Yes, I believe that's correct.

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17363
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625