Progress® Telerik® Reporting R3 2018

ReportsHostBaseSendMailMessage Method

Sends an e-mail message containing a report document to its recipients. Override this method in order to effectively send the mail message.

Namespace:  Telerik.Reporting.Services.ServiceStack
Assembly:  Telerik.Reporting.Services.ServiceStack (in Telerik.Reporting.Services.ServiceStack.dll) Version: 12.2.18.1017 R3 2018 SP2

Syntax

protected virtual HttpStatusCode SendMailMessage(
	MailMessage mailMessage
)

Parameters

mailMessage
Type: System.Net.MailMailMessage
The mail message to send

Return Value

Type: HttpStatusCode
The default value is NotImplemented.

Remarks

The default implementation of this method is empty. Override this method in order to use the feature.

Examples

protected override HttpStatusCode SendMailMessage(MailMessage mailMessage)
{
    using (var smtpClient = new SmtpClient("smtp.companyname.com", 25))
    {
        smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
        smtpClient.EnableSsl = true;
        smtpClient.Send(mailMessage);
    }
    return HttpStatusCode.OK;
}

See Also

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy