SSRS report email delivery subscription failure - reporting-services

I have a report and when I tried to create a subscription for email delivery to my address, I have received a status message as
Failure sending mail:An error has occured during report processing.
What can be the possible reasons of this message.
The report works fine normally, is since it failed due to some reason the error message is?

Maybe your report has parameters which can't be filled in when sending a mail.

Are you sure the e-mail preferences are set up correctly? Does your SMTP server allow relaying from the SSRS machine? Can you send any other e-mails from the SSRS machine?

Related

SSRS 2019 -- subscription email fails ONLY when attaching the report

I have SSRS 2019 in native-mode with SQL Server 2019 standard behind it. To be very clear, email functionality works and outgoing emails from SSRS is being sent and received. The issue is when the option to attached the report (Include Report) is selected in the subscription options, the following error is received at time of execution:
Failure sending mail: The permissions granted to user '' are insufficient for performing this operation.Mail will not be resent.
I've tried different render format (MHTML, PDF, CSV, XML) to no avail. "Include Link" option works without issue. So unless there is a secret permission somewhere for attachments, I'm a bit confused.
SQL Server Database Mail works and shares the same email configuration values as SSRS.
If anyone has faced this issue, I would love to know what caused it and how you solved it in case my situation is the same.
Nevermind everyone. After I posted my question, I realized the service account was still at the default "Virtual Service Account". After I got an actual domain service account and updated it, plus restarted the service, emails with attachments started flowing through without issue.
Note: I had to delete my 1 existing test subscriptions since it no longer was being recognized with the new service account. After creating a new subscription, there were no more issues with attachment-emails. This in itself could be another problem altogether. More testing is required.

How to configure read receipts for email subscriptions?

Is there any way that we can determine if the recipient has seen the report that was delivered through a subscription by email option?
No, the "Read Receipts" is configured on the E-mail server. It is not a supported configuration of the email notification on Reporting Services. Microsoft Reference
Here is the reference for E-Mail Delivery in Reporting Services. It describes report server e-mail delivery operation and configuration.
This is not directly supported, but you could build a workaround for it. For example, you could have a link provided the email that you request them to click on. The link would contain an ID and go to a site/report that logs the ID.
You could even go a step further and just send a link. They would have to click it to see the report and that could be logged.

System.Net.Mail.SmtpException : The operation has timed out

I have developed an mvc 5 application from which I'm sending e-mail using smtp. Before sending email I have to export pdf reports in a folder and than attach those reports with email. When I'm sending single email than no problems occur but when I'm sending 2000 or above emails with attaching pdf reports than at a certain time exporting stopped and no email is sending from the application. When I tried to catch the exception I found following exception thrown :
System.Net.Mail.SmtpException : The operation has timed out
Can anyone please help me regarding this issue.
With Regards
Sending a single mail will go very fast, but sending 2000 mails might take time, especially when sending files in each mail
set the timeout higher since there is much more data to process:
smtpClient.Timeout = 5000000;

Email subscriptions to exchange groups

I am attempting to set up a subscription on my report server that will send out an email to a outlook email group. However when I specify the group in the To: field on the report server I get the following email in response when the subscription is actually ran.
Your message did not reach some or all of the intended recipients.
Subject: Report was executed at 4/20/2011 9:39:02 AM
Sent: 4/20/2011 9:39 AM
The following recipient(s) cannot be reached
Outlook Email Group on 4/20/2011 9:39 AM
You do not have permission to send to this recipient. For assistance, contact your system administrator.
However, when I change the TO: to include members of that group they receive the emails fine. My question is, is it possible to specify out email group names in the TO: field of a report server subscription or do you have to put all of the individual email addresses of the members of that group in there for it to work? One of the responses that I got so far was: Consider that the Report Processor "logs on" with specific credentials. This is the Service Account. Try to open a Windows Session using these credentials and send the mail. I expect it will fail. Make sure this account has group-send rights. Is this correct and if so should I be consulting with our exchange server admin to get group send rights added and to which user account?
The most likely reason is that your group may be configured to only accept mail from authenticated users, but there are also other possibilities, for example it is also possible that the group has been configured to only accept mail from a certain set of users.
It is definitely possible to put Exchange Group names into the SSRS recipient list.
I'm agree with your comment: this looks like an Exchange problem. Check with the mail admins to see what restrictions on mail to groups exist.
SSRS uses SMTP to send email. You can follow the instructions on Technet for How to Use Telnet to Test SMTP... Substitute in the server name and from address that SSRS is set to use. You will likely see the test message refused with an error that will hopefully give you more details on the error. At the very least, it will give you something to take to the Exchange team. ( I don't believe that sending email from SSRS supports authentication, but I'm not sure on that.)

Retrieve SMTP response of a mail

Is it possible to retrieve the SMTP response of a mail. For example, I am sending a mail to non existing email id. Surely our server will send us a mailer daemon failure mail to our mail id. I need to capture that failure mail.
How its possible? please explain me. Some time we may enter more than one non existing email id, so i have to retrieve all the failure mail alone for every corresponding emails
Please guide me!
Thanks in advance,
Praveen J
I think I understood your question correctly now. As I understand, you are writing an application to send mail. And in your application, whenever you send a mail, you also want verify that if mail was delivered and also if it was not delivered then you want to get hold of the failure message in your application. Is that how you mean?
Well, if that is how you mean, then I think it is impossible to track the mail status with your apllication code. For instance if you are using java sendMail in your apllication you can only ensure that the send happened from your code successfully(without any send exceptions like java.net.SocketException or javax.mail.MessagingException). But, you can never ensure if the mail really reached the recepient. i.e. you can never track in your application if the mail was rejected due to wrong recepient address or any other error like illegal attachment at receipient mail server or errors like blocked sender id etc.
That is because any such error condition will be communicated by the receipient mail server to the sending mail server the information of which is present in the sent mail's header.
Does that answer your question? (Or did I understand your question correctly? ;-))
I am not sure if I am getting your question right. If you send an email to any non existent address say xxx#gmail.com from your address yyy#yourhost.com, the mail server at gmail.com replies to the mail server at yourhost.com with failure message and reason, with your delivery address and you receive the fialure mail automatically. you don't have to do anything extra in this.
If you are talking about seeing mail headers, then it depends on which client you are using. For instace, if you are using MS outlook, you can right-click on the message and click options and then see internet headers section to get mail headers. If you are using some web based mail then i am sure there will some option to view detailed mail headers.
The bounced messages are going to return to a mailbox. You should be able to configure that mailbox by properly setting the headers on the messages you send out. You would then need to monitor that mailbox, or have that mailbox deliver the messages to your program.
I would suggest you consider using VERP for all messages you send out. It will make it much easier for you to identify which email address a particular bounce belongs too. To do this you would need control of your mail server though. It takes some work configuring things.
To answer the question with more detail you need to tell us how your are sending messages, what type of mail server you are running, and how much control you have over the mail server.
On Unix, you can use "procmail" for this. Procmail is a service which can intercept your mails and process them following rules.
If you can access your mail my IMAP, I suggest to look at the Python module imaplib.