Sending HTML Emails can be frustrating when not done correctly. CSS formatting is lost when you view it inside your favorite email client. The level of support varies between email client but most of them works well with inline CSS. Now if you have finished creating you HTML Email you need to inline all your CSS. You can use Premailer for that.
- Go to Premailer
- Paste the HTML as the source. Make sure you use absolute URLs
- Copy the HTML result
- Use any text editor to replace all double quotes (“) into single quotes (‘)
- Minify your code. Minifying just means removing all line breaks and spaces. Minifying code is a must with SPD HTML Emails. There’s a lot of online tools, and prettydiff is one, that can you help you do this. NotePad++ has this too by Menu->Edit->Blank Operations-> Remove Unnecessary Blanks and EOL.
Minifying code is a must with SPD HTML Emails. There’s a lot of online tools, and prettydiff is one, that can you help you do this. NotePad++ has this too by Menu->Edit->Blank Operations-> Remove Unnecessary Blanks and EOL.
That’s it! Follow my blog article SharePoint 2010 Designer HTML Emails.
There are many reasons why you’ll want to send emails in html. With html email you can have better looking emails with better formatting and pictures. In my case, I need to add the version number on the SharePoint Alert email. I can add the version number to the email so I figured I can just make it look like the SP Alert email instead.
- Click on the Email workflow step.
- Click on Advanced Properties.
- On the Send an Email Properties popup click on the Body, then on the ellipsis button.
- The String Builder window opens. Paste the html and click OK button.
I happened to maintain around 200 rules on 4 search scopes. Adding rules to Search Scopes is a slow process so I use this script to do it.
$scopeName = 'TestScopeName'
$siteUrl = 'http://intranet.contoso.com'
$searchSvcApp = 'Search Service Application'
$site= Get-SPSite $siteUrl
$searchContext = [Microsoft.Office.Server.Search.Administration.SearchContext]::GetContext($site)
$scopes = New-Object Microsoft.Office.Server.Search.Administration.Scopes($searchContext)
$myscope = $scopes.GetScope($siteUrl, $scopeName)
$ssa = Get-SPEnterpriseSearchServiceApplication -Identity $searchSvcApp
And now to actually add the rule to the search scope.
New-SPEnterpriseSearchQueryScopeRule -Url $siteUrl -Scope $myscope -RuleType Url -UrlScopeRuleType Folder -FilterBehavior Include -MatchingString 'http://intranet.contoso.com/ListOrLibraryName/' -SearchApplication $ssa
Test Search Scope Name
This happened when my Administrator password and I’ve changed it. The password was updated in Active Directory. Running the PowerShell command tells SharePoint to update it’s record too.
I always see this error on the logs. Though harmless it’s also useless.
TaxonomyPicker Error on Windows Event Logs
To stop seeing this error just rename the TaxonomyPicker.ascx to something else.
cd "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\CONTROLTEMPLATES"
ren TaxonomyPicker.ascx TaxonomyPicker.ascx_useless
Suppose you’re creating a site and encountered an error like this.
You want to know what feature it is missing by using the GUID. Here’s how using PowerShell.
Get-SPFeature -Identity enter_guid_without_braces.
Get-SPFeature -Identity d5191a77-fa2d-4801-9baf-9f4205c9e9d2
And if you want just a list of all features run the command without parameters.