Implementing Send Mail Message
This tutorial elaborates how to implement the SendMailMessage method of the ReportsController. This is required to enable the send document endpoint used for HTML5 Report Viewer Send Mail Message functionality.
Embedding Reports / Generating Reports Remotely
New to Telerik Reporting? Download free 30-day trial
This tutorial elaborates how to implement the SendMailMessage method of the ReportsController. This is required to enable the send document endpoint used for HTML5 Report Viewer Send Mail Message functionality.
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;
}
Protected Overrides Function SendMailMessage(ByVal mailMessage As MailMessage) As HttpStatusCode
Using smtpClient = New SmtpClient("smtp.companyname.com", 25)
smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network
smtpClient.EnableSsl = True
smtpClient.Send(mailMessage)
End Using
Return HttpStatusCode.OK
End Function
Copyright © 2025 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.
Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.