I want to establish a contact page for clients send mail to my concrete email:Ex; webmaste@abc.edu
in that page.have a textbox for user type their email:,textbox for title,textbox for body.and 1 button send.
but i dont know how to solve this problem with i will use which SMTP server,port,.. .Because Their email is not concrete.(yahoo,gmail,,,,,)
So How can i do? help me .thanks
Mycode:
SmtpClient obj = new SmtpClient();
MailMessage msg = new MailMessage();
MailAddress mailadd = new MailAddress(this.Txt_EmailFrom.Text.ToString().Trim());
msg.From = mailadd;
msg.To.Add("webmaste@abc.edu");
msg.BodyEncoding = System.Text.Encoding.UTF8;
msg.IsBodyHtml = false;
msg.Subject = this.Txt_Title.Text.Trim();
msg.Body = this.Txt_Body.Text.Trim();
//obj.Host = "localhost" //Here i dont know ?which host i will use for my page? i used localhost,it cannot send mail.
//obj.Port = 25;
//obj.DeliveryMethod = SmtpDeliveryMethod.Network;
obj.Send(msg);