Open IvanRF opened 8 years ago
@IvanRF Is inappropriately Gmail trimming anything with the Comment Mail notification templates? Do you have a screenshot?
@raamdev I tested the default templates on another site. I sent 2 confirmation emails, and the second one is completely trimmed. Google trims whatever is repeated from a previous mail, leaving only visible the text from the start until the "repeated text" starts. That's why I was adding a hidden Ref#[comment_url]
at the end of my emails with StCR, making me sure that my footer was always shown.
Screenshot:
@IvanRF Ah, I see what you mean. That's an important point to address, I agree.
I'm marking this as a bug that needs research.
@raamdev as an example, on StCR I was using this just before </body>
<p style="color: #f6f6f6;font-size: 0;text-align: center;">
Ref#[comment_permalink]
</p>
and my emails background was background-color: #f6f6f6;
. So, the text was there (not visible) and Gmail never trimmed the content since the comment ID number was always different.
Hi... I'm trying to include [comment_id] or [comment_url] in the footer so the notification mail always have different info, and the signature doesn't get trimmed but the shortcode is not getting replaced by the actual comment id or url...
Is this supposed to work like this? Isn't it possible to use shortcodes in the footer?
This is the only thing i need to get sorted in order to buy the pro version.
@jorgeleon84 In the current version of Comment Mail, shortcodes in the footer are not supported. However, that has been added now (see Issue #246) and will be coming in the next release (in about a week). The latest release candidate (see announcement) includes the added support for shortcodes in the footer.
Note: If you're interested in testing a beta release of Comment Mail before the next version comes out, please sign-up to be a beta tester here.
I tested the default templates on another site. I sent 2 confirmation emails, and the second one is completely trimmed. Google trims whatever is repeated from a previous mail, leaving only visible the text from the start until the "repeated text" starts.
@raamdev I was able to reproduce this issue. I tried adding the shortcode [comment_time_ago]
to the email footer template and this was prevented, i.e. the Gmail didn't hide the email signature anymore on the 2nd email. Let me know how you would like to proceed with this.
@kristineds So are you saying that this issue can be closed now?
@raamdev The [comment_time_ago]
shortcode is not yet available for the Simple Email Footer Tag Template though. The current shortcodes accepted in the footer right now are: [home_url]
,[blog_name_clip]
, and [current_host_path]
.
I had to switch to the Advanced Email Template version, and then add the PHP version of the [comment_time_ago]
shortcode.
If you would like me to add it as part of the accepted footer shortcodes, let me know, and I'll start working on it.
@kristineds you need to use something unique like the comment id. A reference like the time ago might be the same among different mails. In my case, I use the comment URL which has the comment id as part of the URL.
@kristineds It sounds like we need to add something unique to the default Email Footer template so that GMail doesn't hide it. Since notification email templates might be digests (i.e., might contain notifications for more than one comment), it probably doesn't make sense to use the Comment URL. Instead, I propose that we create a new shortcode specifically for this purpose using uniqid()
to generate a unique ID:
[unique_id]
- A unique ID that can be used to prevent email clients from auto-hiding the email footerThen we can update the default Email Footer template to include:
<p style="color: #f6f6f6;font-size: 0;">
Ref# [unique_id]
</p>
Also referencing some discussion on StackOverflow about this issue: http://stackoverflow.com/questions/11078264/how-to-get-rid-of-show-trimmed-content-in-gmail-html-emails
Just a heads up, this approach doesn't actually work very well. We've tried it for our transactional emails as well, but found that even with the unique code, gmail was still trimming other duplicate parts of the email message. It might work for the footer in this case, but when more elements of your email are the same, very weird things can happen.
We ended up trying to append a unique code after every paragraph, but even though we blanked that out with CSS, it would still show up in the content preview on the mobile gmail clients.
So in the end, our solution was to remove the unique code altogether, and just make sure that our email subjects are always unique. We accomplish this by or example including a date (if applicable), or someone's name, etc. This doesn't solve it for all cases, but works well enough for us for it not to be a severe problem.
Hope this helps someone out there finding this thread.
@adamreisnz Thank you very much for the feedback! That's definitely helpful.
With StCR, I noticed that Gmail was cutting everything below the new comment content. So, I followed this procedure: How to Prevent Gmail from Trimming your Email Signature. Thus, I solved it by adding at the end of the email
Ref#[comment_url]
(I also applied some CSS to hide it visually, but it has to be present in the mail content in order to avoid Gmail trimming).I see two options:
[comment_url]
and some[if is_comment_notification]
(in case it is a subscription mail)