New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Send E-mail

Mail To
Send Email
The RadSocialShare control offers the ability to send the link, provided in the UrlToShare property, via an E-mail, not just to the social networks. The easiest way to do so is by using the MailTo button - it triggers the system's default mail client - for example MS Outlook, Outlook Express, etc. To add this functionality you need:
<telerik:RadSocialButton SocialNetType="MailTo"/>

This RadSocialShare has only one button defined - the MailTo button. A click will trigger your system's mail client.


There is also another option - by using the built-in E-mail form. It requires the developer to have an SMTP server that should be used for the purpose. It is triggered via:

<telerik:RadSocialButton SocialNetType="SendEmail" />

This RadSocialShare has only the SendEmail button. A click will trigger the built-in Send E-mail form. The EmailSettings inner property is used for configuration.

Note that the SendMail functionality requires an SMTP server set up and will not work in this demo as there is none declared for security reasons as the whole markup is visible and will expose this sensitive information. The minimum settings to make it work are SMTPServer and FromEmail (this can be a fake email address but in valid form which will be pointed in the On Behalf Of feature).

  • DefaultVB.aspx
  • styles.css
<%@ Page Language="vb"  %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container size-thin">
        <div class="el-container first">
            <strong>Mail To</strong>
            <telerik:RadSocialShare RenderMode="Lightweight" runat="server" ID="RadSocialShare1">
                <MainButtons>
                    <telerik:RadSocialButton SocialNetType="MailTo"></telerik:RadSocialButton>
                </MainButtons>
            </telerik:RadSocialShare>
        </div>
        <div class="el-container">
            <strong>Send Email</strong>
            <telerik:RadSocialShare RenderMode="Lightweight" runat="server" ID="RadSocialShare2" UrlToShare="http://www.telerik.com">
                <EmailSettings FromEmail="email@mysite.com" SMTPServer="mySMTPserver"></EmailSettings>
                <MainButtons>
                    <telerik:RadSocialButton SocialNetType="SendEmail"></telerik:RadSocialButton>
                </MainButtons>
            </telerik:RadSocialShare>
        </div>
    </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance