Click here to Skip to main content
15,884,986 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a feedback Page that takes input in Textbox. I want that when User Click on "submit" Button , I get information by mail in my mailbox.
How i can do it? I am Fresher so please Help me....
Posted

Do you have tried any thing for this.
See
CP Results
 
Share this answer
 
Hello there,

take a look on this URL,hope this will help you:-
Sending Mail Using C# via SMTP[^]
Sending Emails from C# Application using default SMTP[^]
Send Email in ASP.Net 2.0 - Feed back Form[^]

Regards
Andy.
 
Share this answer
 
Basically, you put the data you need in the Web form and use HTTP request method "post". On server side, you gather the requested data, make a e-mail message our of it and send it using some mail agent (most typically, using SMTP).

First of all, please see:
http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient%28v=vs.90%29.aspx[^]
http://msdn.microsoft.com/en-us/library/system.net.mail.aspx[^].

See also:
Please see:
http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-aspnet-to-send-email-from-a-web-site[^],
http://forums.asp.net/t/1726545.aspx/1[^].

This topic is too popular. With CodeProject along, you can find plenty of relevant information and code samples:
unable to send mail , it showing the error in below code .[^].

I need to warn you about security in your approach. This is really serious. Please see my past answer:
unable to send mail , it showing the error in below code .[^].

—SA
 
Share this answer
 
Please refer following url,

Send mail using Google Apps[^]

Hope this may help you.
 
Share this answer
 
try this
MailAddress mailfrom = new MailAddress ( "frommail@gmail.com" );
           MailAddress mailto = new MailAddress ( "tomail@gmail.com" );
           MailMessage newmsg = new MailMessage ( mailfrom, mailto );

           newmsg.Subject = "Subject of Email";
           newmsg.Body = "Body(message) of email";

           ////For File Attachment, more file can also be attached

           Attachment att = new Attachment ( "G:\\code.txt" );
           newmsg.Attachments.Add ( att );

           SmtpClient smtps = new SmtpClient ( "smtp.gmail.com", 587 );
           smtps.UseDefaultCredentials = false;
           smtps.Credentials = new NetworkCredential ( "urmail@gmail.com", "urpwd" );
           smtps.EnableSsl = true;
           smtps.Send ( newmsg );
 
Share this answer
 
C#
MailMessage emailmsg = new MailMessage();
        emailmsg.From = new MailAddress("abc@inc.com", "abc");
        emailmsg.To.Add(new MailAddress("cdf@inc.com", "cdf"));
        emailmsg.Subject = "Regarding Some information";
        emailmsg.Body = "stest bodcy";
        emailmsg.IsBodyHtml = true;
        emailmsg.Priority = MailPriority.Normal;
        SmtpClient mailclient = new SmtpClient("smtp.bizmail.yahoo.com");
        mailclient.Credentials = new System.Net.NetworkCredential("careers@inc.com", "123");
                
        mailclient.Send(emailmsg);
 
Share this answer
 
check my post here

How to send email through asp.net[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900