Monday, October 18, 2021

Test telnet smpt office 365 port 587 with Powershell

Rum powershell command with

$creds = get-credential

Enter username & Password Email

copy and paste with this command

Send-MailMessage –From test@tv.com –To akka@global.net –Subject "Fwd: Test Email" –Body "Test SMTP Service from Powershell on Port 587" -SmtpServer smtp.office365.com -Credential $creds -UseSsl -Port 587

with attach file

Send-MailMessage –From test@tv.com –To akka@global.net –Subject "Fwd: Test Email" –Body "Test SMTP Service from Powershell on Port 587" -Attachments "C:\PS\SampleAttachment.txt" -SmtpServer smtp.office365.com -Credential $creds -UseSsl -Port 587

Ref. uncaoffice-365-test-smtp-on-port-587

https://infra.engineer/azure/56-office-365-test-smtp-on-port-587-using-powershell


No comments: