none
Sending mail from webbservice on cloud server using .net.smtpclient stopped working

    Question

  • Hi

    We have created a webbservice which is running on an Azure cloud-server on our domain.

    When we set this server up we configured mail for the webbservice using smtp.office365.com.

    In the webservice code we use .NET.smtpclient with host smtp.office365.com on port 587 with SSL and credentials from our cloud domain.
    This has worked well last time we tested the service in october 2016.
    The project has been put aside for a while, but now when we are about the start it up again, the mail-function is no longer working. We started a support-issue with Microsoft but when it worked to connect to smtp.office365.com using telnet they said it was an application error.
    They (Microsoft person) repeated that TLS was to be used instead of SSL, but that makes no sense since .NET FW 4.5 does not have any TLS options on its SmtpClient, only SSL.

    What may have changed regarding SmtpClient since last fall for this to stop working?

    Any help is appreciated.


    Best Regards Peter Karlström Midrange AB, Sweden

    Monday, March 20, 2017 6:26 PM

Answers

  • Getting back just to explain what did happen and how the problem was resolved.

    The account from which we sent the mail was created with the web-UI of Azure.

    In that process no information was given that the password we selected made the account temporary for 90 Days.
    After 90 Days the account got disabled.

    If we change the password in the same UI (Azure Web-UI) and the password is the as before, we got no warning this was not allowed.
    You also have to login to the cloud service (i.e. webb mail) with the new account and change the password one time.
    This will make the account permanent.

    All this was nothing any of the Microsoft technicians I spoke to that day mentioned anything about.


    Best Regards Peter Karlström Midrange AB, Sweden

    Wednesday, April 12, 2017 3:05 PM

All replies

  • Peter,

    A beautiful understated complaint. However, don't expect some help here, we are just non Microsoft persons helping others, this kind of problems needs knowledge from the guys who are responsible for the quality of the Microsoft products involved in your problem. Sometimes it helps to contact the office in your Country

    https://www.microsoft.com/sv-se/contact.aspx



    Success
    Cor


    Monday, March 20, 2017 7:26 PM
  • Hello Cor

    What about the TLS-business?

    Is there no way of sending smtp-mail using TLS in .NET? Only SSL.


    Best Regards Peter Karlström Midrange AB, Sweden

    Monday, March 20, 2017 9:43 PM
  •  Have you tried doing a few searches to find any info on this?  I did one google search and found several links with examples, info, and answers on using TLS in .net.

     VB.NET - Send Email over SSL/TLS Setting - Example

     SMTPClient, ESMTP, Authentication, and TLS Encryption

     SMTP Client with SSL/TLS

     And here is the search result i got these from,  you can look through them for more info.

     Use TLS in vb.net


    If you say it can`t be done then i`ll try it

    Tuesday, March 21, 2017 1:33 AM
  • Getting back just to explain what did happen and how the problem was resolved.

    The account from which we sent the mail was created with the web-UI of Azure.

    In that process no information was given that the password we selected made the account temporary for 90 Days.
    After 90 Days the account got disabled.

    If we change the password in the same UI (Azure Web-UI) and the password is the as before, we got no warning this was not allowed.
    You also have to login to the cloud service (i.e. webb mail) with the new account and change the password one time.
    This will make the account permanent.

    All this was nothing any of the Microsoft technicians I spoke to that day mentioned anything about.


    Best Regards Peter Karlström Midrange AB, Sweden

    Wednesday, April 12, 2017 3:05 PM