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: 13.0.19.208 R1 2019 SP1

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;
}

Version Information

Supported in: 1.0.1

See Also

In this article
Not finding the help you need?