Closed smasterson closed 10 years ago
hmmmmm the main change would have been the header, and that doesn't work well in Outlook really either. Might revert that back to how it was, and perhaps create a new style for email reports.
As you say, HTML emails are a pain to get working nicely in all clients. Pretty much have to go back to the dark ages of HTML- tables for layout, and styles defined on elements (which I guess also changed).
On second look, I guess Gmail isn't so bad. Just strips it down pretty plain but it is readable. Far from critical.
I found this handy website, which details the CSS support of various email providers/clients: http://www.campaignmonitor.com/css/
Gmail ignores any CSS in the head section, which is why it is showing up as plain :( Reverting to the old embedded styles will fix this. I probably won't have time to do it until next week, so if someone else want to take this up before then go ahead.
I guess we need to decide how to handle this- my inclination would be to either create an email style based off the VMware style using elements supported by most email clients/providers, or to be able to define a report and email template within a style.I'd prefer the latter as then you can just run the report once and get both outputs, but will require more changes to the code.
Hey, just out of interest- how does the "Default" style look for you? Might be easiest to modify the colours in this to get back to the more compatible version...
Using the default style does bring tables back to gmail (though other things like alt row coloring does not show). The default style has no tables in Notes (though it did in previous versions). It's most likely impossible to please all clients..or even close for that matter. Maybe a simple vs fancy style would work but that could take some work as 'simple' really wants inline html which is extremely limited and troublesome to code. Though not truly ideal, send as an attachment is probably the best answer in the end to avoid having more web code than powershell.
Cool, that makes sense - the zebra tables are using inline style tags which don't appear to be supported on gmail, and also selectors which won't really work without this (I believe). Also- yikes- someone still uses Notes!
I think 100% compatibility is a pipe dream. I guess we need to look at vCheck as an enterprise toolset and cover the most common email applications. With that in mind, I'd say Outlook (including O365) and Gmail would be the minimum, but supporting these will most likely mean we cover off a lot of other clients.
The style definition might need a bit of tweaking- I'd like to make them a bit more extensible at some point- so perhaps this can include ways to provide compatibility between email and standalone reports without too much hassle.
Welcome to the nightmare of different email HTML standards, you would t believe how much time I took on this in the past before I introduced an attachment and gave up! You will never please all, and when you do a new phone will come out with a new standard.
Hi guys!
Can you replace your VMware style with the file below and let me know how it looks? https://raw.githubusercontent.com/Sneddo/vCheck-vSphere/master/Styles/VMware/Style.ps1
I've been trying to get something reasonably consistent at least in a browser and Outlook (2010), and OWA 2013. Just want to test across as many clients as possible before merging.
I ran it through [Litmus}(https://litmus.com) and looks reasonably good for most clients - Notes 8.5 was probably the exception.
I tried the new style with Outlook 2010 and it seems that most of the things are OK. The visualization of "QuickStats Capacity Planning" is not correct. Other examples "DRSRules - List of Host Affinity Rules", "DRSRules - List of VM Anti Affinity Rules". Simply there is no enough space between the tabs and also the information below each tab is not visualized correctly.
Notes and Gmail show some good and some not so good changes. Example: Notes 8.5 Current - Table borders/coloring missing completely (no biggie). Tables are smushed together (narrow as possible to accommodate data/headers). Headers OK.
Notes 8.5 New - Table borders/coloring are starting to appear, though not complete. Table widths are inconsistent. Headers are bunched.
Gmail Current - Table outline/coloring missing completely (no biggie). Tables are smushed together (narrow as possible to accommodate data/headers). Headers OK.
Gmail New - Table outline/coloring missing completely (no biggie).Table width properly matches viewing width. Headers bunch above plugin name.
For Notes I currently send as attachment, as none of the styles display well. For Gmail I currently use the Default style which looks ok.
Just for feedback...not expecting miracles for either client
Thanks for the feedback guys :)
Outlook 2010 - I haven't run this with many plugins as I'm making changes and running the report the shorter runtime the better. I'll start running our daily reports with the new style and see what breaks.
Notes 8.5 New - Which tables are not taking up 100%? I do have an entry in there to set all tables to 100%, but perhaps notes ignores this :( Honestly, probably not going to worry about Notes too much but if it's an easy fix then it's a bonus.
Gmail new - Gmail is a pretty horrible client it appears. Will have to move back to inline styles to support it properly :( That said, once we do that it should look as expected.
Looks like I removed the $HTML
Now is much better than yesterday for Outlook 2010. Much like the attached html report.
Both Gmail and Notes look a lot better.
Notes New - Minor artifacts with top header image. Tables showing correctly. Table widths are biggest issue - are all cramped.
Gmail New - Table widths look good. Only thing missing is table borders/shading.
Hi Sneddo,
We are using notes in our environment. Can u tell me the location where i can download the updated version for the notes changes ???
Thanks, Karthik
@smasterson: Awesome, thanks! With Notes, which table(s) are cramped? Hard to tell from the screenshot snippets above. I'll give GMail a bit of a look at some point- as I mentioned this should be reasonably easy to fix.
@akarthikeyan16 : https://raw.githubusercontent.com/Sneddo/vCheck-vSphere/master/Styles/VMware/Style.ps1
I've pushed another update to my repo (see link above).
Gmail now has pretty headers! The downside is that either the email disclaimer or gmail breaks it if you view the entire message. (i.e. if the email is long enough you get a "[Message clipped] View entire message" link at the bottom which goes to a full page, which breaks the formatting due to the extra HTML that it injects :(
Hi Sneddo,
Thank you for your prompt response. I have tried with the updated lotus notes style . Have issues like the Table widths are in different size and not aligned to email width.
later will upload the screenshot
Please advise.
Thanks, karthik
Gmail looks much better - only thing off I can see is no color shading (Eg: Host Alarms with status red)
Notes is looking better as well. Could just use some work on table widths.
Yeah, I noticed the row styles don't work in GMail. That will require a change to the formatting rules code in vCheck.ps1. Not too fussed about that as the cell formatting appears to work OK, just need to explicitly define the style on each table cell rather than the row element.
Trying one more thing for notes- can you guys test again? Setting the width to 100% explicitly on the table element. From what I've read this seems to be the most effective method (at least for newer versions of Notes). If it doesn't work, I'm not sure I'll spend too much more time on it.
At least we now have consistent (or close enough to) formatting in Outlook (2010), OWA (2013), browser (IE, Chrome) and Gmail. Much better than what we started with.
Notes - Tables themselves look better - now just need to space out the columns :-)
OK, we're getting pretty close!
I've just committed an update to vCheck.ps1, can you try running with it: https://raw.githubusercontent.com/alanrenouf/vCheck-vSphere/master/vCheck.ps1 That should fix the content table widths in Notes, and the row styles should work in Gmail
Edit: Actually, I just realised there is one more change required. You'll need an update to the style as well.
Hi Sneddo, I have tried in Notes with the above vcheck.ps1. the result is the same it s not in order. Im not able to paste screenshots can u advise how to add screenshots here.
I'm not able to paste screenshots can u advise how to add screenshots here.
See the caption below the comment box :)
oops am sorry below the green comment box i dont see anything can u show me in screenshot.
Sure :)
Notes looks great - kudos!!
Gmail still missing row styles (using latest style.ps1 and vCheck.ps1)
hmmmmm I'm guessing just the Host alarms plugin, right? There's a reason for that...the format rules set a class on the table cell which gmail ignores -_-
Try this version instead: https://raw.githubusercontent.com/Sneddo/vCheck-vSphere/master/Plugins/30%20Host/36%20Host%20Alarms.ps1
I'll have to go through and update the other plugins as well at some point...
Hi Sneedo,
Finally am able to attach screenshots :) Attached are the Notes screenshots for u.
Hi Smasterson,
Could you provide me the link for notes version which is working for you ( style.ps1 and vCheck.ps1) Thankss..
Looks good all around - grab yourself a beer (or three)!
The good news about the shading change is that it is not used in many plugins. One quick change - the updated Host Alarms needed a } at the very end of the last line. It should read: @{ "-eq 'red'" = "Row,style|background: #FFDDDD !important" })}
@akarthikeyan16 - the updated files can be found here: vCheck.ps1 - https://raw.githubusercontent.com/alanrenouf/vCheck-vSphere/master/vCheck.ps1 style.ps1 - https://raw.githubusercontent.com/Sneddo/vCheck-vSphere/master/Styles/VMware/Style.ps1
Scratch the missing } I must have miss your last line when I copy/paste the code...disregard
Dear Smasterson\ Sneedo,
Its working the report is clean and perfect. I love you guys for helping me. Now i will take two guiness beer :)
You guys are rocking Cheers, Karthik
Right, I think I'll merge these changes in and close this off :)
Just wanted to post a comment on the recent email changes. Course I love the progress(!), but it's not without a bit of issues. For example, the new format is pretty much unreadable via Gmail and Lotus Notes (which happen to be the way I read daily reports). I do understand formatting HTML emails across different clients is a very difficult task. Just wanted to make everyone aware...as unfortunately, not everyone uses Exchange/Outlook (boy I miss those days!!). The fix me for so far has been to switch to using an attachment, which isn't quite as convenient but works well.