Outbound connectivity issue from my one API to godaddy smtp while other api is able to connect to same perfectly.

Apaxion Techlonolgies 0 Reputation points
2026-10-27T16:31:07.13+00:00

Outbound connectivity issue from my one API to godaddy smtp while other api is able to connect to same perfectly.

Linux app servce plan B1

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Jose Benjamin Solis Nolasco 12,861 Reputation points Volunteer Moderator
    2026-10-27T21:48:22.1733333+00:00

    Welcome to Microsoft Q&A

    Hello @Apaxion Techlonolgies I hope you are doing well,

    I would recommend comparing the following between the working and failing App Services:

    • SMTP hostname and port (preferably 587 with STARTTLS/TLS).
    • App Settings and connection-string configuration.
    • VNet Integration settings (if enabled).
    • Outbound IP addresses listed under App Service → Properties.
    • Any access restrictions, firewall rules, or IP allowlists configured on the GoDaddy side.

    For a Linux App Service, a good first step is to test connectivity directly from the failing app using the Kudu/SSH console and compare the results with the working app:

    nslookup <smtp-hostname>

    curl -v <smtp-hostname>:587

    If DNS resolution and TCP connectivity succeed, the issue is likely related to SMTP authentication, TLS negotiation, or application configuration rather than Azure networking.

    Also, please check Diagnose and solve problems in the failing App Service and review the Outbound connectivity diagnostics for any networking-related findings.

    Could you share:

    • The exact SMTP error message or exception from the failing API?
    • Whether both APIs are running in the same App Service Plan (B1)?
    • Whether both apps use the same SMTP hostname and credentials?

    References

    https://learn.microsoft.com/azure/app-service/overview-inbound-outbound-ips#find-outbound-ips

    https://learn.microsoft.com/troubleshoot/azure/virtual-network/troubleshoot-outbound-smtp-connectivity#summary

    https://learn.microsoft.com/troubleshoot/azure/app-service/troubleshoot-intermittent-outbound-connection-errors#summary

    If my answer helped you resolve your issue, please consider marking it as the correct answer. This helps others in the community find similar solutions.

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-10-27T16:31:51.4533333+00:00

    Test DNS and TCP connectivity from the failing Linux App Service itself, then compare its SMTP configuration and outbound IP set with the working API; one app succeeding does not prove that another app uses the same network path or source IP.

    1. Test from the failing app

    1. Open the failing app in Azure portal.
    2. Select Development Tools → Advanced Tools → Go → Tools → Debug Console → CMD.
    3. Run:
    nslookup smtpout.secureserver.net
    curl -v smtpout.secureserver.net:587
    

    Replace the hostname and port with the exact GoDaddy SMTP endpoint configured in the application. For Linux App Service, nslookup tests DNS and curl hostname:[port] tests connectivity from the app sandbox.^1^

    Interpret the result:

    • DNS lookup fails: compare the apps’ Networking → Virtual network integration and DNS-related configuration.
    • Connection times out or is refused: continue with outbound-IP and port checks below.
    • TCP connects: networking is working. Compare the application’s SMTP hostname, port, credentials, encryption mode, and logs for TLS or authentication errors.

    Run the same commands from the working API so the results are directly comparable.

    2. Compare outbound IP addresses

    Each App Service app has a set of outbound addresses, and an outbound connection can use any address in its current set. GoDaddy or an intervening firewall might allow the working API’s addresses but not the failing API’s addresses.^2^

    For each API:

    1. Open App Service → Properties.
    2. Compare:
      • Outbound IP Addresses
      • Additional Outbound IP Addresses
    3. If GoDaddy uses an IP allowlist, add all current outbound IP addresses for the failing app—not just one.

    The same comparison can be made in Cloud Shell:

    az webapp show \
      --resource-group <resource-group> \
      --name <app-name> \
      --query "{current:outboundIpAddresses,possible:possibleOutboundIpAddresses}" \
      --output json
    

    If GoDaddy requires one predictable source address, use App Service virtual network integration with Azure NAT Gateway. Virtual network integration is available on the Basic tier, including B1.^2^

    3. Check the SMTP port

    If the failing API is configured for port 25, change it to GoDaddy’s authenticated submission endpoint and port 587, provided that endpoint supports it. Microsoft recommends authenticated SMTP relay over TCP 587 for App Service; port 587 is not subject to Azure’s SMTP restriction.^3^

    For port 587, compare the failing API against the working one for:

    • Exact SMTP hostname
    • Port 587
    • Authentication enabled
    • Username and secret source
    • STARTTLS/TLS enabled
    • App settings and deployment-slot settings

    Do not assume the values are identical merely because both applications target GoDaddy.

    Port 25 should not be the default design. App Service port-25 scenarios depend on network architecture such as virtual network integration or App Service Environment v3, while authenticated relay on port 587 is the supported general approach.^3^

    4. If failures are intermittent

    If connections sometimes succeed and later time out, inspect App Service → Diagnose and solve problems → Outbound connections from my app are failing. Rapidly creating SMTP connections to the same host and port can exhaust SNAT ports; App Service initially allocates 128 SNAT ports per instance, and closed connections are reclaimed after a delay.^4^

    In that case:

    • Reuse SMTP connections where the client supports it.
    • Dispose connections correctly.
    • Avoid opening many parallel SMTP sessions.
    • Correlate timeouts with request volume and the App Service SNAT diagnostics.

    If TCP connectivity succeeds but SMTP still fails, capture the exact SMTP exception and server response. That distinguishes TLS negotiation, authentication, sender-policy, and recipient-policy failures from Azure outbound networking.


    References

    1. Troubleshoot virtual network integration with Azure App Service
    2. Inbound and outbound IP addresses in Azure App Service
    3. Troubleshoot outbound SMTP connectivity problems in Azure
    4. Troubleshoot intermittent outbound connection errors in Azure App Service
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

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