From Azure VM dot net application is hosted. I could not send email from the application

NewCoder 0 Reputation points
2024-11-16T16:04:24.6433333+00:00

In azure VM dot net application has been hosted. Through application we are sending emails. It was working fine till last week once the azure subscription got deactivated and reactivated all the settings gone. Now mails are in Queue directory.

We are using godaddy SMTP relay.

  1. In webconfig, we added below. <system.net>
        <mailSettings>
    
            <smtp deliveryMethod="Network">
    
                <specifiedPickupDirectory pickupDirectoryLocation="C:\inetpub\mailroot\Pickup" />
    
                <network host="XX.XX.XX.XX" port="25" />
    
            </smtp>
    
        </mailSettings>
    
    </system.net>
    
  2. In IIS, for the the SMTP of the domain application as below.User's image

All the above settings used to work before.

  1. Now all the emails are in Queue of mailroot.
  2. Another important thing is between the VMs only internal IP sharing is happening not with VMs name sharing.
  3. For example VM1 and VM2. VM1 as shared directory of DATA. Previously it used share if we give VM1\Data from VM2. But now its not working we have to use 10.0.0.1\DATA
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,111 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Marcin Policht 27,820 Reputation points MVP
    2024-11-16T16:45:33.3866667+00:00

    SMTP outbound is blocked by default.

    Follow https://learn.microsoft.com/en-us/azure/virtual-network/troubleshoot-outbound-smtp-connectivity


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.