Posts Tagged ‘Email’

Send email with Powershell

There’s two methods I often use for sending email in my Powershell scripts. The first uses the Send-MailMessage cmdlet and the second resorts to using the .Net Framework. Why do I use two methods? Well…. ?View Code POWERSHELLSend-MailMessage -To ‘me@here.com’ -From ‘sender@here.com’ -Subject ‘Test Message’ -Body ‘This is a test message.’ -SmtpServer ‘smtp.server.com’; The Send-MailMessage […]