Emailing Reports

Stimulsoft Reports.WEB discussion
Post Reply
JohnW
Posts: 103
Joined: Mon Nov 20, 2017 8:29 pm

Emailing Reports

Post by JohnW »

I would like to email a report to a person. I have their email address in the data file used to create the report. Is there a way to populate the Send To with the email address from the database record?

So I have a report I want to send from my user BillsCompany.com to John@JohnJohn.com. The sender information is set up and is working, I just want the Send To: to be John@JohnJohn.com. The email address for the Send To: (John@JohnJohn.com) is in a datafield.

How do I populate it (Send To:)with the data? I am trying to save the users key strokes.


Thanks for any suggestions
JohnW
Posts: 103
Joined: Mon Nov 20, 2017 8:29 pm

Re: Emailing Reports

Post by JohnW »

Just to update, I do not see any suggestions for this in the programming manual or user manual documentation.

Suggestions?
Lech Kulikowski
Posts: 6266
Joined: Tue Mar 20, 2018 5:34 am

Re: Emailing Reports

Post by Lech Kulikowski »

Hello,

Could you explain your issue in more details?
Please clarify which viewer component are you use?

Thank you.
JohnW
Posts: 103
Joined: Mon Nov 20, 2017 8:29 pm

Re: Emailing Reports

Post by JohnW »

I am using Stimulsoft Web. I am using webforms and I believe that means the HTMl viewer.

I have report based on a data row from a table. In that row of data is a data column containing the email address. The email (smtp) is setup and working. I would like now to populate the Send To: part of the email with that email address contained in the data row.

I would like to have the user have all the email data and effectively just push Send.

I just am not sure how to dynamically fill the Send To part of the email message with the email address from the data row.

I hope this helps.

I am using the current version of Stimulsoft Reports and it is running in Windows 10.
Lech Kulikowski
Posts: 6266
Joined: Tue Mar 20, 2018 5:34 am

Re: Emailing Reports

Post by Lech Kulikowski »

Hello,

You can use the following code:

Code: Select all

protected void Page_Load(object sender, EventArgs e)
    {
        StiWebViewer1.DefaultEmailAddress = "address@email.com";
        StiWebViewer1.DefaultEmailSubject = "subject";
        StiWebViewer1.DefaultEmailMessage = "default message";
        ...
    }
But you should provide email address manualy from database, report engine does not have access to the email form

Thank you.
JohnW
Posts: 103
Joined: Mon Nov 20, 2017 8:29 pm

Re: Emailing Reports

Post by JohnW »

Thanks! I will give it try.


John W.
Lech Kulikowski
Posts: 6266
Joined: Tue Mar 20, 2018 5:34 am

Re: Emailing Reports

Post by Lech Kulikowski »

Hello

We are always glad to help you!
Please let us know if you need any additional help.

Thank you.
Post Reply