Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## $emailAddress = send to,
- ## $emailSubject = subject of e-mail
- $emailAddress = Read-Host -Prompt "Input E-Mail Address"
- # Going to dynamically build .SQL files within a certain folder to this e-mail subject line
- $emailSubject = Read-Host -Prompt "Input E-Mail Subject"
- $emailBody = Read-Host -Prompt "Input E-Mail Body"
- $ol = New-Object -comObject Outlook.Application
- $mail = $ol.CreateItem(0)
- $Mail.Recipients.Add($emailAddress)
- $Mail.Subject = $emailSubject
- $Mail.Body = $emailBody;
- $Mail.Send()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement