SocialShare

Controls

All Controls

SocialShare

Rate this demo

Thank you for your post!
Submit a support ticket
If you have an active license or trial, you have access to dedicated support from Telerik’s developers. Response time is 24h for active licenses and 72h for trials, Mon-Fri.
Post in the forums
If you don’t have access to support or would like to help other people by sharing your problem, reach out to our active community in the forums.

SocialShare - Send E-mail

This RadSocialShare has only one button defined - the MailTo button. A click will trigger your system's mail client.
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).

Sending emails


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 the

<telerik:RadSocialButton SocialNetType="MailTo" />

button.


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 the

<telerik:RadSocialButton SocialNetType="SendEmail" />

button. More information on that is available in this help article.
C# VB
Show code in new window Demo isolation steps
<%@ Page Language="C#"  %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>ASP.NET SocialShare Demo - Send E-mail</title>
     <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="QsfSkinManager" runat="server" ShowChooser="true" />
    <telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All" EnableRoundedCorners="false" />
     <div style="float: left; width: 400px;">
          <div class="textWrapper">
               This <strong>RadSocialShare</strong> has only one button defined - the <strong>MailTo</strong>
               button. A click will trigger your system's mail client.
          </div>
          <telerik:RadSocialShare runat="server" ID="RadSocialShare1">
               <MainButtons>
                    <telerik:RadSocialButton SocialNetType="MailTo"></telerik:RadSocialButton>
               </MainButtons>
          </telerik:RadSocialShare>
     </div>
     <div style="width: 400px; float: left; margin-bottom: 30px; margin-left: 40px;">
          <div class="textWrapper">
               <span>This <strong>RadSocialShare</strong> has only the <strong>SendEmail</strong> button.
                    A click will trigger the built-in Send E-mail form. The <strong>EmailSettings</strong>
                    inner property is used for configuration. </span>
          </div>
          <telerik:RadSocialShare 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 style="clear: both">
     </div>
     <span style="font-size: 12px; font-style: italic; color: red;">Note that the <strong>
          SendMail</strong> 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 <strong>SMTPServer</strong> and <strong>FromEmail</strong> (this can
          be a fake email address but in valid form which will be pointed in the <strong>On Behalf
               Of</strong> feature).</span>
    </form>
</body>
</html>
Telerik UI for ASP.NET AJAX Q3'14 Release is here