Sign in
|
Join PowerShell.com!
|
Help
Home
PowerTips
Ask the Experts
Forums
Webcasts
Blogs
eBookV2
Script Library
Twitter Grid
Modules
QuickClick
Scripts
Snippets
Videos
Library
»
Script Library
»
Windows Server 2008
»
Slideshow
Windows Server 2008 Slideshow
Share
|
Browse Library
Module Library
QuickClick Library
Script Library
Active Directory
BizTalk
Citrix
Clustering
Desktop
Exchange Server 2003
Exchange Server 2007
File System
Group Policy
Internet Information Server (IIS)
Local Accounts
Logs
Microsoft Office
Microsoft Team Foundation Server
MySQL
Networking
Registry
Remote Desktop Services
Remoting
Security
SharePoint
SQL Server
System Center Virtual Machine Manager
System Center Configuration Manager
System Center Operations Manager
Tutorial
Terminal Server
Using .Net
Virtual Server
VMware
Windows 7
Windows HPC
Windows Server 2000
Windows Server 2003
Windows Server 2008
Windows XP
WMI
Misc
Snippet Library
Video Library
Members Only
Tags
aman dhally
Create Shares
email
grant directory ownership
Microsoft Cluster
powershell
read text file
Send email
View more
Send HTML Formatted Email
##############
Script start Here ##########
# $smtp variable contain the name/ip of your email server ##
# $to contain the email id whom you want to send email ###
# $from contain email of sender ###
# $Subject contain subject of the email.
# In Body we are defining some HTML coding in to our email message body
# <b> means BOLD
#<br> means Break go to next Line
#<a href> provide a link to the text
# <font color=red> , give the color to the font
$smtp
=
"Exchange-Server"
$to
=
"Aman Dhally <amandhally@gmail.com>"
$from
=
"Aman Singh <aman.dhally@analysysmason.com>"
$subject
=
"This is a Test of HTML Email"
$body
=
"Dear <b><font color=red>$to</b></font> <br>"
$body
+=
"We are testing <b>HTML</b> email <br>"
$body
+=
"Click <a href=http://www.google.com>here</a> to open google <br>"
#### Now send the email using \> Send-MailMessage
send-MailMessage
-SmtpServer
$smtp
-To
$to
-From
$from
-Subject
$subject
-Body
$body
-BodyAsHtml
-Priority
high
########### End of Script################
Loading...
Send HTML Formatted...
Compare-Hotfixes
FCMigrationPub...
View all files
Copyright 2011 PowerShell.com. All rights reserved.