Hello, I've found some conflicts between the the "subscriptions", "HTML emails" and "post by email" plugins.
First, links are not rendered correctly when sent via email by the subscriptions plugin.
There appear to be two things causing this. One is that When the email body is filtered/processed SP()->user->thisUser is empty. This will result in the permissions check failing and links will display "[Permission to view this link is denied]". Additionally, this same problem will cause links to video services (which gets converted to an iframe when displayed on the forum) to be displayed as "[Permission to view this media is denied]". I was able to work around this issue by always allowing links to be viewed (using a filter), and a filter to set the user properly before the email notification is sent out:
On line 332 of sp-resouces/forum-plugins/html-email/library/sp-html-email-components.php the post content is included in the email, and filtered using the displayFilters->content() function. This call is using the $newpost['postcontent_unescaped'] field which will overwrite any modifications made by filters from previous functions. For example if I want to modify links before they are sent out via email in by using the filter sph_subscriptions_notification_email I cannot actually modify the post content because I do not have access to change $newpost['postcontent_unescaped'] that will be used by sp_html_email_do_subs_body.
Lastly, there is a problem parsing email content when using the post by email plugin (tested through gmail). Curly or smart quotes and double quotes appear incorrectly. I believe this is due to utf-8 encoding being used by gmail and simplepress is using ISO-8859-1 .
Please let me know how I can proceed with these issues, or if there is some workaround I can follow.
Any help is much appreciated!
One other thing I've found related to smart/curly quotes not rendering correctly. My assumption was correct in that it is a conflict between utf-8 and ISO-8859-1.
On line 82 of sp-email-post-imap.php in the function sp_process_inbox_imap the following is run:
$content = trim(utf8_encode(quoted_printable_decode($content)));
The call to utf8_encode here will cause the conflict since this function "Encodes an ISO-8859-1 string to UTF-8"
Unfortunately there are no filters or ability to modify this encoding. And the other two issues I mentioned are still a problem
Please let me know what should be done.