Trigger email from command line RRS feed

  • Question

  • Hi experts

    One of my application is triggering an email from windows server. The application is unable to trigger an email. 
    i have my smtp server settings as on port 29080, i want to trigger an email from command prompt to check its an application issue or relay issue. How can i trigger email from command prompt
    with the below settings

    SMTP settings: on port 29080
    my email:

    • Edited by Risingflight Tuesday, January 28, 2020 11:57 PM s
    Tuesday, January 28, 2020 11:57 PM


  • Hi,

    We can use the Send-MailMessage command to help us send an email message from within PowerShell

    $msolcred = get-credential
    Send-MailMessage –From –To –Subject “Test Email” –Body “Test SMTP Relay Service” -SmtpServer  -Credential $msolcred -UseSsl -Port 29080


    Joyce Shen

    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact

    • Marked as answer by Risingflight Thursday, January 30, 2020 3:52 PM
    Thursday, January 30, 2020 1:58 AM