Answers for "windows batch file send email"

0

batch script send email

Use batch script to call powershell Send-MailMessage

Batch Script:send_email.bat
		C:WindowsSystem32WindowsPowerShellv1.0powershell.exe  -command 'E:pathsend_email.ps1

Pwershell Script:send_email.ps1
		Send-MailMessage -From "noreply@$env:computername" -To '<[email protected]>' -Subject 'Blah Blah' -SmtpServer  'smtp.domain.com'  -Attachments 'E:pathfile.log' -BODY "Blah Blah on Host: $env:computername "
Posted by: Guest on September-17-2020

Code answers related to "windows batch file send email"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language