简体   繁体   中英

How to use gmail account for ssrs email subscription

I have a report using SSRS 2008 R2 , I want to subscribe to this report using the "email" option. I have configured the settings in the reporting services manager to use server as "smtp.gmail.com" and sender address as my gmail ID.

I also tried using the SMTP virtual server and relay it using smart host as "smtp.gmail.com". But I get the following error while sending email :

Failure sending mail: The transport failed to connect to the server.

I am using IIS 7 and Windows Server 2008 . Following is the snippet of my rsreportserver.config file:

<SMTPServer>smtp.gmail.com</SMTPServer>
<SMTPServerPort>587
</SMTPServerPort>
<SMTPAccountName>
</SMTPAccountName>
<SMTPConnectionTimeout>
</SMTPConnectionTimeout>
<SMTPServerPickupDirectory>
</SMTPServerPickupDirectory>
<SMTPUseSSL>True
</SMTPUseSSL>
<SendUsing>2</SendUsing>
<SMTPAuthenticate></SMTPAuthenticate>
<From>myid@gmail.com</From>

Any help will be highly appreciated. Thanks

I was having a problems getting SSRS 2017 to connect. I tried a dozen different suggestions and ended up with the following. I didn't need to setup the SMTP relay or SMTP service on the windows server.

Open Reporting Services Configuration Manager . Go to E-mail Settings >>>

  • Sender Address: [user]@gmail.com (or your G-Suite domain)
  • Current Delivery Method: Use SMTP server
  • SMTP Server: smtp.gmail.com
  • Authentication= "Username and password (basic)"
  • Username: [user]@gmail.com (or your G-Suite domain)
  • Password
  • Confirm Password
  • Use Secure Connection: Checked

Now go to the rsreportserver.config file. Mine was located at C:\\Program Files\\Microsoft SQL Server Reporting Services\\SSRS\\ReportServer\\rsreportserver.config

Find the <SMTPServerPort> and set to 587

Save rsreportserver.config

From what I have read, it sounds like you might have to setup a local SMTP relay server that you send the email through, b/c SSRS requires that "The Report Server service must have Send As permissions on the SMTP server" and does not appear to give any options for entering a password. I am assuming the SSRS subscription email setup only works using Windows authentication since it uses the SSRS Service, but the configuration documentation is vague. ( http://technet.microsoft.com/en-us/library/ms345234(v=sql.105).aspx )

Here is a link that shows how to setup the SMTP relay server http://www.vsysad.com/2012/04/setup-and-configure-smtp-server-on-windows-server-2008-r2/

Here are the steps you'll need to do differently.

  • Item 19, choose Basic Authentication, enter your gmail account info, and make sure TLS encryption is checked.
  • Item 21, enter your server name as the Fully-qualiified domain name. Enter "smtp.google.com" as the "Smart host".

Then specify the SMTP server you just created above in your SSRS SMTP configuration.

You probably also need to enable POP3 on your gmail account if you have not already. https://support.google.com/mail/answer/13273?cbid=wl8yzeug2lob&src=cb&lev=topic

Having struggled with this for the past few hours I thought it might be valuable to share another method for anyone else still unable to configure an SSRS instance to send subscription emails via gmail using their smtp relay service.

For this example, my company uses Gmail Servers to host our own domain and I assume that you have access to the Admin Console on Google Apps.

Step 1 - Configure Gmail

  • Log into Google Apps with an Administrator Account
  • Go into the admin console
  • Select Apps > Gmail > Advanced Settings
  • Find SMTP Relay Service
  • Add New
    1. Allowed Senders - Set to "Only Addresses In My Domains"
    1. Authentication - Set to "Only Accept Mail From Specified IP"
    1. Add the Public IP Range of the Server SSRS is running on
    1. Leave TLS Encryption Unchecked
    1. Leave SMTP Authentication Unchecked
    1. Save

You should then have settings that look like this:

  • Allowed senders: Only addresses in my domains
  • Only accept mail from the specified IP addresses: Yes
  • Allowed IP addresses: (Your Description)
  • Require SMTP Authentication: No
  • Require TLS encryption: No

Step 2 - Configure SSRS

  • Go to SSRS Configuration Manager > Email Settings
  • Enter Sender address as email@yourgmaildomain.co.uk
  • Use SMTP Server
  • SMTP Server = "smtp-relay.gmail.com"

Following these steps will allow you to send emails using SSRS subscriptions without needing to set up your own relay server. Hope this helps some other poor sole from spending hours trying to figure it out!

REF: https://support.google.com/a/answer/2956491?vid=1-635782669150538047-3380580329

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM