Hello,
This is venkat,
I was trying to send the email using the following codes but error occurs everytime can you fix this.
is this correct format? pls send if any correct coding for that? also what are the things should declare in the top?
This is venkat,
I was trying to send the email using the following codes but error occurs everytime can you fix this.
Code:
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Net.Mail;
MailMessage mail = new MailMessage();
mail.To = ToTextBox.Text;
mail.From=FromTextBox.Text;
mail.CC=CcTextBox.Text;
mail.Subject=SubTextBox.Text;
mail.Body=MsgTextBox.Text;
System.Net.Mail.SmtpClient SmtpServer = "localhost";
SmtpServer.Send(mail);
Comment