简体   繁体   English

如何使用Gmail帐户进行SSRS电子邮件订阅

[英]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. 我有一个使用SSRS 2008 R2的报告,我想使用“电子邮件”选项订阅此报告。 I have configured the settings in the reporting services manager to use server as "smtp.gmail.com" and sender address as my gmail ID. 我已在报告服务管理器中配置设置,将服务器用作“smtp.gmail.com”,将发件人地址用作我的gmail ID。

I also tried using the SMTP virtual server and relay it using smart host as "smtp.gmail.com". 我还尝试使用SMTP虚拟服务器,并使用智能主机将其中继为“ 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 . 我正在使用IIS 7Windows Server 2008 Following is the snippet of my rsreportserver.config file: 以下是我的rsreportserver.config文件的片段:

<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. 我在连接SSRS 2017时遇到问题。 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. 我不需要在Windows服务器上设置SMTP中继或SMTP服务。

Open Reporting Services Configuration Manager . 打开Reporting Services配置管理器 Go to E-mail Settings >>> 转到电子邮件设置 >>>

  • Sender Address: [user]@gmail.com (or your G-Suite domain) 发件人地址:[user] @ gmail.com(或您的G-Suite域)
  • Current Delivery Method: Use SMTP server 当前传递方法:使用SMTP服务器
  • SMTP Server: smtp.gmail.com SMTP服务器:smtp.gmail.com
  • Authentication= "Username and password (basic)" Authentication =“用户名和密码(基本)”
  • Username: [user]@gmail.com (or your G-Suite domain) 用户名:[user] @ gmail.com(或您的G-Suite域)
  • Password 密码
  • Confirm Password 确认密码
  • Use Secure Connection: Checked 使用安全连接:已选中

Now go to the rsreportserver.config file. 现在转到rsreportserver.config文件。 Mine was located at C:\\Program Files\\Microsoft SQL Server Reporting Services\\SSRS\\ReportServer\\rsreportserver.config 我的位于C:\\ Program Files \\ Microsoft SQL Server Reporting Services \\ SSRS \\ ReportServer \\ rsreportserver.config

Find the <SMTPServerPort> and set to 587 找到<SMTPServerPort>并设置为587

Save rsreportserver.config 保存 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. 从我所阅读的内容来看,听起来您可能必须设置要通过其发送电子邮件的本地SMTP中继服务器,b / c SSRS要求“报表服务器服务必须对SMTP服务器具有“代理发送”权限”,并且没有似乎提供了输入密码的任何选项。 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. 我假设SSRS订阅电子邮件设置仅使用Windows身份验证,因为它使用SSRS服务,但配置文档含糊不清。 ( http://technet.microsoft.com/en-us/library/ms345234(v=sql.105).aspx ) 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/ 这是显示如何设置SMTP中继服务器的链接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. 在第19项中,选择“基本身份验证”,输入您的Gmail帐户信息,并确保选中了“ TLS加密”。
  • Item 21, enter your server name as the Fully-qualiified domain name. 项目21,输入您的服务器名称作为完全合格的域名。 Enter "smtp.google.com" as the "Smart host". 输入“ smtp.google.com”作为“智能主机”。

Then specify the SMTP server you just created above in your SSRS SMTP configuration. 然后在SSRS SMTP配置中指定上面刚刚创建的SMTP服务器。

You probably also need to enable POP3 on your gmail account if you have not already. 您可能还需要在您的Gmail帐户上启用POP3(如果尚未启用)。 https://support.google.com/mail/answer/13273?cbid=wl8yzeug2lob&src=cb&lev=topic 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. 在过去的几个小时里,我一直在努力解决这个问题,我认为为其他任何仍无法配置SSRS实例的人分享另一种方法,通过gmail使用他们的smtp中继服务发送订阅电子邮件可能很有价值。

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. 对于此示例,我的公司使用Gmail服务器来托管我们自己的域,并且我假设您可以访问Google Apps上的管理控制台。

Step 1 - Configure Gmail 第1步 - 配置Gmail

  • Log into Google Apps with an Administrator Account 使用管理员帐户登录Google Apps
  • Go into the admin console 进入管理控制台
  • Select Apps > Gmail > Advanced Settings 选择应用> Gmail>高级设置
  • Find SMTP Relay Service 查找SMTP中继服务
  • Add New 添新
    1. Allowed Senders - Set to "Only Addresses In My Domains" 允许的发件人 - 设置为“仅限我的域中的地址”
    1. Authentication - Set to "Only Accept Mail From Specified IP" 身份验证-设置为“仅接受来自指定IP的邮件”
    1. Add the Public IP Range of the Server SSRS is running on 添加正在运行SSRS的服务器的公共IP范围
    1. Leave TLS Encryption Unchecked 取消选中TLS加密
    1. Leave SMTP Authentication Unchecked 取消选中SMTP身份验证
    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 仅接受来自指定IP地址的邮件:是
  • Allowed IP addresses: (Your Description) 允许的IP地址:(您的描述)
  • Require SMTP Authentication: No 需要SMTP身份验证:否
  • Require TLS encryption: No 需要TLS加密:否

Step 2 - Configure SSRS 第2步-配置SSRS

  • Go to SSRS Configuration Manager > Email Settings 转到SSRS配置管理器>电子邮件设置
  • Enter Sender address as email@yourgmaildomain.co.uk 输入发件人地址为email@yourgmaildomain.co.uk
  • Use SMTP Server 使用SMTP服务器
  • SMTP Server = "smtp-relay.gmail.com" SMTP服务器=“ 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. 遵循这些步骤将允许您使用SSRS订阅发送电子邮件,而无需设置您自己的中继服务器。 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 参考: https//support.google.com/a/answer/2956491? vid = 1-635782669150538047-3380580329

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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