locked
SMTP server not work in my dev project, but email can be sent in Powershell. RRS feed

  • Question

  • User-1801897777 posted

    Hi,

    The SMTP server in my university has been working fine. It stopped working a couple of days ago when I was testing in my ASP.NET project (Visual studio 2015).  I can send email via SMTP server in Powershell.  What could be the reasons cause my problem?

    The error message is 'Unable to connect remove server'

    Thanks

    Tuesday, November 6, 2018 8:58 PM

Answers

  • User753101303 posted

    Hi,

    Seems quite generic. Don't you have an inner exception ? If catching exception you can write simplified message for users but a developer should use Exception.ToString() - rather than Exception.Message - to get the full details.

    You mean PowerShell on the same machine, using the same account and with equivalent code ? It could be still for example that an Antivirus is blocking this particular process (but not PowerShell).

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, November 6, 2018 9:18 PM

All replies

  • User753101303 posted

    Hi,

    Seems quite generic. Don't you have an inner exception ? If catching exception you can write simplified message for users but a developer should use Exception.ToString() - rather than Exception.Message - to get the full details.

    You mean PowerShell on the same machine, using the same account and with equivalent code ? It could be still for example that an Antivirus is blocking this particular process (but not PowerShell).

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, November 6, 2018 9:18 PM
  • User-1801897777 posted

    Thank you for your quick response. Actually the setting in SMTP caused my problem. Thanks

    Tuesday, November 6, 2018 10:31 PM