Click here to Skip to main content
15,888,323 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: ArrayList looping Pin
Yusuf2-Mar-09 2:09
Yusuf2-Mar-09 2:09 
QuestionRunTime Controls in Web Page Pin
Zeyad Jalil1-Mar-09 1:53
professionalZeyad Jalil1-Mar-09 1:53 
AnswerRe: RunTime Controls in Web Page Pin
Calin Tatar1-Mar-09 2:05
Calin Tatar1-Mar-09 2:05 
AnswerRe: RunTime Controls in Web Page Pin
Abhishek Sur1-Mar-09 2:19
professionalAbhishek Sur1-Mar-09 2:19 
QuestionRun methods of a runtime created object Pin
mehrdadc4828-Feb-09 21:16
mehrdadc4828-Feb-09 21:16 
AnswerRe: Run methods of a runtime created object Pin
Curtis Schlak.1-Mar-09 1:29
Curtis Schlak.1-Mar-09 1:29 
QuestionSending email in ASP.net Pin
rehal28-Feb-09 18:57
rehal28-Feb-09 18:57 
AnswerRe: Sending email in ASP.net Pin
netsooz (Amir Hamidi)28-Feb-09 19:38
netsooz (Amir Hamidi)28-Feb-09 19:38 
to send an email from your application you have to ways: 1- use smtp server of your own 2- use one of the free smtp servers like gmail's

accordingly after choosing your smtp there are two coding ways that goes as below:
1- add namespace of System.Net.mail;
2-in the click event of your [Send Email] button:
MailMessage mailmsg= new MailMessage();
  mailmsg.From = new MailAddress("Your Email Address");
  mailmsg.To.Add("Email of reciver");
  mailmsg.Subject = "Your sybject";
  mailmsg.Body = "The body of your mail (You can use html tags too";
  mailmsg.IsBodyHtml = true;
  SmtpClient smpt= new SmtpClient("127.0.0.1"); [if you are using your application in your own host]
  smtp.Send(mailmsg);


-----------------------
Now if you don't have your own smtp and wanna use free one like google's do as below:
1- add the same name space
2- Code as below:
string subject = "Your Subject";
        string from = "Your Gmail account having @gmail.com";
        string rec = "reciver email";
        string body = "The mail body.";
        MailMessage mail = new MailMessage(from, rec);
        mail.IsBodyHtml = true;
        mail.SubjectEncoding = System.Text.UnicodeEncoding.UTF8;
        mail.Subject = subject;
        mail.Body = body;
        SmtpClient sm = new SmtpClient();
        System.Net.NetworkCredential me = new System.Net.NetworkCredential();
        me.UserName = "your gmail username";
        me.Password = "your gmail password";
        sm.UseDefaultCredentials = false;
        sm.Credentials = me;
        sm.Host = "smtp.gmail.com";
        sm.Port = 587;
        sm.EnableSsl = true;
        sm.Send(mail);


hope it works

Proper Prepration Prevents Poor Performance! h

AnswerRe: Sending email in ASP.net Pin
Christian Graus1-Mar-09 9:21
protectorChristian Graus1-Mar-09 9:21 
QuestionDynamic controls Pin
Jas 00728-Feb-09 18:47
Jas 00728-Feb-09 18:47 
AnswerRe: Dynamic controls [modified] Pin
Yusuf28-Feb-09 18:57
Yusuf28-Feb-09 18:57 
GeneralRe: Dynamic controls Pin
rehal28-Feb-09 19:01
rehal28-Feb-09 19:01 
Questioncookie Pin
vaibhav08728-Feb-09 18:39
vaibhav08728-Feb-09 18:39 
AnswerRe: cookie Pin
Yusuf28-Feb-09 18:56
Yusuf28-Feb-09 18:56 
Questionhow to use "tab control"?? Pin
lsh486love28-Feb-09 17:53
lsh486love28-Feb-09 17:53 
AnswerRe: how to use "tab control"?? Pin
Yusuf28-Feb-09 21:31
Yusuf28-Feb-09 21:31 
GeneralRe: how to use "tab control"?? Pin
lsh486love1-Mar-09 14:35
lsh486love1-Mar-09 14:35 
Questionpassing function arguments on a onmouseover event [modified] Pin
alvarog0128-Feb-09 9:28
alvarog0128-Feb-09 9:28 
AnswerRe: passing function arguments on a onmouseover event Pin
Calin Tatar28-Feb-09 13:08
Calin Tatar28-Feb-09 13:08 
GeneralRe: passing function arguments on a onmouseover event Pin
alvarog012-Mar-09 1:17
alvarog012-Mar-09 1:17 
Questionhandle sql error to stop user reputation Pin
netsooz (Amir Hamidi)28-Feb-09 9:19
netsooz (Amir Hamidi)28-Feb-09 9:19 
AnswerRe: handle sql error to stop user reputation Pin
Curtis Schlak.28-Feb-09 12:45
Curtis Schlak.28-Feb-09 12:45 
GeneralRe: handle sql error to stop user reputation Pin
netsooz (Amir Hamidi)28-Feb-09 19:44
netsooz (Amir Hamidi)28-Feb-09 19:44 
GeneralRe: handle sql error to stop user reputation Pin
Curtis Schlak.1-Mar-09 1:27
Curtis Schlak.1-Mar-09 1:27 
AnswerRe: handle sql error to stop user reputation Pin
Sam Horne1-Mar-09 14:58
Sam Horne1-Mar-09 14:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.