Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
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 18-Mar-12 21:35pm
eranup408
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Do you have tried any thing for this.
See
CP Results
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

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
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

Please refer following url,
 
Send mail using Google Apps[^]
 
Hope this may help you.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 6

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 );
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 7

 
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);
 
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 8

check my post here
 
How to send email through asp.net[^]
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 304
1 Maciej Los 285
2 Sergey Alexandrovich Kryukov 230
3 Shweta N Mishra 186
4 Aajmot Sk 153
0 OriginalGriff 7,660
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,760


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 27 Jul 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100