Microsoft
Software
Hardware
Network
Question : Move Mailbox Powershell Script (sending Welcome e-mail HTML format)
Hi,
Moving the mailbox (from 2003 to 2010) is not a problem..however i cannot get the script to determine the move status ( and send welcome email if status = completed or completed with warning). I've included my script below. My main problem is getting it send the HTML email.
Could anyone stop me from pulling out what's left of my hair?
Thanks
function SendEmail
{
Param ($To, $From, $Subject, $Body, $Attach)
$msg = New-Object Net.Mail.MailMessage
$msg.From = $From
$msg.To.Add($To)
$msg.Body = $Body
$body= New-Object System.Text.StringBuilder
$msg.Subject = $Subject
$msg.IsHtmlBody = $true
$client = New-Object Net.Mail.SmtpClient("local
host")
$client.Send($msg)
}
$EmailTo = “*@bskyb.com”
$EmailFrom = “*@bskyb.com”
$EmailSub = “Migration to Exchange 2010”
$EmailBody = get-content "c:\temp\welcomemail.html”
| Out-String
#Call Function
SendEmail $EmailTo $EmailFrom $EmailSub $EmailBody
Answer : Move Mailbox Powershell Script (sending Welcome e-mail HTML format)
You have put IsBodyBody, it's IsBodyHtml !!
Also, make sure you have a file called 'welcomemail.html' in c:\temp
Shaun
Random Solutions
Windows 2008 Remote Desktop Services - This computer can't connect to the remote computer when there are more than 2 connections
stsadm import command fails to execute
extract email address from string in excel
Why could the man eat meat after flood?
SBS Backup failed on D: "The system cannot find the path specified."
Show UnFriendly HTTP Error
Notepad++ Is there a way to show the cursor offset from the beginning of the file
trial version vmware "there are not enough licenses installed to perform the operation"
expression questions
Possible Memory leak in 3rd party com+app