Here is the discussion of how to send mail from Gmail using Asp.net 3.5 without login your Gmail account.
Write the small line of code as follows:
Sample:
<html>
<body>
<form id="form1" runat="server">
<fieldset style="width: 500px; padding: 10px;">
<legend>Sending email from GMail</legend>
<div align="left" style="padding: 5px;">
Your Gmail EmailID<br />
<asp:TextBox ID="TextBoxSenderEmailId"runat="server" Width="250px"></asp:TextBox><fontcolor=silver>Please enter your GMailId <br />(e.g yourId@gmail.com)</font><br /><br />
Friend's EmailId<br />
<asp:TextBox ID="TextBoxReceiverEmailId"runat="server" Width="250px"></asp:TextBox><fontcolor=silver>Please enter your friend's emailId<br />(e.g abc@xyz.com)</font><br />
<br />
Subject<br />
<asp:TextBox ID="TextBoxSubject"runat="server" Width="350px"></asp:TextBox><br />
<br />
Body<br />
<asp:TextBox ID="TextBoxBody" Width="350px"TextMode="MultiLine" Rows="5" runat="server"></asp:TextBox><br /><br />
<asp:Button ID="btnSendEmail" runat="server"OnClick="btnSendEmail_Click" Text="Send" />
</div>
</fieldset>
</form>
</body>
</html>
0 comments:
Post a Comment