Seal Report Forum
»
Troubleshooting
»
Bug Reports
»
It's impossible to use EmailSkipAttachments=true and my own EmailBody in the same time
Rank: Newbie
Groups: Registered
Joined: 11/19/2020(UTC) Posts: 3 Location: Moscow, RU
Thanks: 1 times
|
I want to send e-mail with my own EmailBody without attachment. But it isn't possible. Example 1. ReportOutput output = Model; output.EmailSkipAttachments=false; output.EmailBody="ALARM!!!"; In result I have a message with an attachment and e-mail body "ALARM!!!". Example 2. ReportOutput output = Model; output.EmailSkipAttachments=true; output.EmailBody="ALARM!!!"; In result I have a message without an attachment and e-mail body contains only services messages. Like: Quote:Execution messages for report 'C:\ProgramData\Seal Report Repository\Reports\DayRegistryStatus.srex':
16:20:55 Starting execution of 'DayRegistryStatus' (No security context)... 16:20:55 Starting to build models... 16:20:55 Build models of Execution Set 1... Example 3. ReportOutput output = Model; output.EmailSkipAttachments=true; output.EmailMessagesInBody=false; output.EmailBody="ALARM!!!"; The result is the same like in Example #2. Finaly, I need to have a message without any attachments and with EmailBody which I have created in Pre-script.
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
You may try this in the Pre-Generation script of the output: Code: output.EmailHtmlBody = true;
System.IO.File.WriteAllText(output.Report.ResultFilePath, "My message body here");
|
|
|
|
Seal Report Forum
»
Troubleshooting
»
Bug Reports
»
It's impossible to use EmailSkipAttachments=true and my own EmailBody in the same time
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.