Share via

how to use azure communications service for smtp

JamesPierce-6019 0 Reputation points
2026-02-10T18:45:30.46+00:00

SQL Reporting Services sending subscription emails

SQL Server Reporting Services
SQL Server Reporting Services

A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.

0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Akhil Gajavelly 1,570 Reputation points Microsoft External Staff Moderator
    2026-02-11T07:32:41.45+00:00

    Hi @James Pierce

    Yes, this will work for SSRS, but you don’t need PowerShell or .NET code.

    For SSRS subscriptions, just use the SMTP details from Azure Communication Services and configure them in RSReportServer.config.

    1. In Azure Communication Services, generate:
      • SMTP Username
        • Client Secret (this is your password)
          • Use server: smtp.azurecomm.net
            • Port: 587 (SSL required)
            1. In SSRS RSReportServer.config, update:

    <SMTPServer>smtp.azurecomm.net</SMTPServer>

    <SMTPServerPort>587</SMTPServerPort>

    <SMTPAccountName>SMTP_USERNAME</SMTPAccountName>

    <SMTPAuthenticate>1</SMTPAuthenticate>

    <SMTPUseSSL>True</SMTPUseSSL>

    <SendUsing>2</SendUsing>

    1. Restart SSRS service and test subscription.

    That’s it. As long as your domain is verified in Azure and port 587 is open, SSRS subscription emails will send successfully using Azure Communication Services with basic SMTP authentication.

    Thanks,
    Akhil.

    0 comments No comments

  2. Q&A Assist
    2026-02-10T18:45:37.2833333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To use Azure Communication Services for SMTP, you need to follow these steps:

    1. Create an Azure Communication Email Resource: Ensure you have an active Azure account and create an Email Communication Resource with a provisioned domain.
    2. Set Up SMTP Credentials: Create SMTP credentials using a Microsoft Entra application that has access to your Azure Communication Services Resource.
    3. Use PowerShell or .NET Libraries: You can send emails using the Send-MailMessage PowerShell cmdlet or the System.Net.Mail.SmtpClient class in .NET. Here’s an example using PowerShell:
         $Password = ConvertTo-SecureString -AsPlainText -Force -String '<Entra Application Client Secret>'
         $Cred = New-Object -TypeName PSCredential -ArgumentList '<SMTP Username>', $Password
         Send-MailMessage -From 'User01 <******@fabrikam.com>' -To 'User02 <******@fabrikam.com>' -Subject 'Test mail' -Body 'test' -SmtpServer 'smtp.azurecomm.net' -Port 587 -Credential $Cred -UseSsl
      
      This script sets up the necessary credentials and sends an email using the Azure Communication Services SMTP server.
    4. Configure Environment Variables: For ease of use, you can store your connection string in an environment variable, which allows you to use it without specifying it every time you run your scripts.
    5. Testing: After setting everything up, you can test sending emails to ensure that your configuration works correctly.

    These steps will help you integrate Azure Communication Services for sending emails via SMTP, which can be useful for sending subscription emails in SQL Reporting Services.


    References:

    0 comments No comments

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.