I'm trying to solve a problem about sending emails from a contact form. I have the first script that i'm using it sending but only to my external account and I got this on that sends but i'ts in vb and I'm not able to attach a style sheet to it. could any one tell me a code that I can use to replace the VB version. Or. can translate the VB into C#
This will be appreciated.
this is my web config file
<smtp from="firstname.lastname@example.org" deliveryMethod="Network">
<network host="mail.myservice.com" port="25" userName="email@example.com" password="service" />
this is my C# backend code.
protected void Button1_Click(object sender, EventArgs e)
SmtpClient smtpClient = new SmtpClient(); MailMessage message = new MailMessage(); try
MailAddress fromAddress = new MailAddress(Email.Text.ToString(), this.Contname.Text.ToString());
message.From = fromAddress;//here you can set address
View Complete Post