logo

Warning: The forum is now for consultation only. Please use GitHub Discussions to post any questions or comments.


Welcome Guest ! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
andrey.malyanov  
#1 Posted : Monday, November 30, 2020 2:07:16 PM(UTC)
andrey.malyanov

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.
epf  
#2 Posted : Tuesday, December 1, 2020 12:57:42 PM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 1,209
Switzerland

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");

Users browsing this topic
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.