|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Provider.EmailSender;
namespace EmailTesting
{
public partial class EmailSend : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnSend_Click(object sender, EventArgs e)
{
SendEmail();
}
private void SendEmail()
{
EmailInfo emailInfo = new EmailInfo();
emailInfo.To = txtTo.Text.Trim();
emailInfo.From = txtFrom.Text.Trim();
emailInfo.Subject = txtSubject.Text;
emailInfo.Body = txtBody.Text;
//Create object of manager class and call sendEmail method which will do rest of things.
EmailProviderManager obj = new EmailProviderManager();
obj.InitializeProvider();
obj.MyEmailProvider.SendEmail(emailInfo);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.