Target audience: System Administrators
Used tools: MS PowerShell
What’s the purpose: Quickly send email
I find a PowerShell command for easier sending email – such as testing smtp connections on a server. You do not then need to install telnet client.
https://community.spiceworks.com/topic/2215186-test-email-flow-from-command-prompt
And here is an example :
Send-MailMessage -To sender@domain.com -Subject "Test 1" -BodyAsHtml -Priority high -Smtpserver exchange-server -From recipient@domain.com -Body "TEST"
exchange-server is name of smtp server – usually it’s something like
- mail.yourdomain.com or
- smtp.yourdomain.com
You can check which of these names is use with ping command. Or you can view the name in the header of your mails in email client you used.
This is very handy, easy and the most important – it works !