Page Editor
Notification

Experience Button



Last updated




Last updated
$title = "Thank you for using SPE!"
$text = "Today is $([datetime]::Now.ToLongDateString())"
$icon = @{$true="Office/32x32/information.png";$false="Applications/16x16/warning.png"}[$SitecoreVersion.Major -gt 7]
$notification = New-Object -TypeName Sitecore.Pipelines.GetPageEditorNotifications.PageEditorNotification -ArgumentList $text, "Info"
$notification.Icon = $icon
$pipelineArgs.Notifications.Add($notification)$item = Get-Item -Path .
$response = Show-Input -Prompt "What's the message for $($item.Name)?"
if($response) {
$mailSettings = @{
To = @("Michael West < [email protected] >")
From = "Console < [email protected] >"
BodyAsHtml = $true
SmtpServer = "localhost"
}
$subject = "Message sent regarding item $($item.Name) from $($SitecoreAuthority)"
$response += "<br/>$($item.ItemPath)"
Send-MailMessage @mailSettings -Subject $subject -Body $response
}
Close-Window