Click here to Skip to main content
15,885,767 members
Home / Discussions / C#
   

C#

 
AnswerRe: TextBox Focus Pin
mikone9-Oct-06 21:34
mikone9-Oct-06 21:34 
AnswerRe: TextBox Focus Pin
quiteSmart9-Oct-06 21:58
quiteSmart9-Oct-06 21:58 
GeneralRe: TextBox Focus Pin
Amar Chaudhary9-Oct-06 22:07
Amar Chaudhary9-Oct-06 22:07 
GeneralRe: TextBox Focus Pin
mikone9-Oct-06 22:32
mikone9-Oct-06 22:32 
JokeRe: TextBox Focus Pin
quiteSmart9-Oct-06 22:40
quiteSmart9-Oct-06 22:40 
QuestionPopup window unable to write text in the parent window Pin
ram19749-Oct-06 19:53
ram19749-Oct-06 19:53 
QuestionHow to send a mail with authentication Pin
quiteSmart9-Oct-06 19:46
quiteSmart9-Oct-06 19:46 
AnswerRe: How to send a mail with authentication Pin
Ashish Derhgawen10-Oct-06 6:17
Ashish Derhgawen10-Oct-06 6:17 
For sending a mail with authentication..you could try:

try
{

System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
message.To.Add(toTextBox.Text);
message.Subject = subjectTextBox.Text;
message.From = new System.Net.Mail.MailAddress(fromTextBox.Text);
message.Body = bodyTextBox.Text;

System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient(SMTPTextBox.Text);
smtp.Credentials = new System.Net.NetworkCredential("username", "password");
smtp.Send(message);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

Replace the "username" and "password" with the actual username and password.

Hope that helps,
Ashish

Time flies like an arrow;
Fruit flies like a banana.

Ashish Derhgawen - http://ashishrd.blogspot.com
GeneralRe: How to send a mail with authentication Pin
quiteSmart10-Oct-06 20:26
quiteSmart10-Oct-06 20:26 
GeneralRe: How to send a mail with authentication Pin
Ashish Derhgawen11-Oct-06 7:48
Ashish Derhgawen11-Oct-06 7:48 
QuestionLaunching a website with a specific referer... Pin
omenrust9-Oct-06 19:18
omenrust9-Oct-06 19:18 
AnswerRe: Launching a website with a specific referer... Pin
Stefan Troschuetz9-Oct-06 21:44
Stefan Troschuetz9-Oct-06 21:44 
GeneralRe: Launching a website with a specific referer... Pin
omenrust10-Oct-06 11:48
omenrust10-Oct-06 11:48 
GeneralRe: Launching a website with a specific referer... Pin
Stefan Troschuetz10-Oct-06 22:14
Stefan Troschuetz10-Oct-06 22:14 
Questionremote registry access problem Pin
RanjithLogics9-Oct-06 18:27
RanjithLogics9-Oct-06 18:27 
AnswerRe: remote registry access problem Pin
abhinish9-Oct-06 19:52
abhinish9-Oct-06 19:52 
GeneralRe: remote registry access problem Pin
RanjithLogics9-Oct-06 22:40
RanjithLogics9-Oct-06 22:40 
QuestionSoftware Protection Pin
Charith Jayasundara9-Oct-06 17:59
Charith Jayasundara9-Oct-06 17:59 
AnswerRe: Software Protection Pin
Malcolm Smart9-Oct-06 20:55
Malcolm Smart9-Oct-06 20:55 
QuestionCreate Deployment Package Pin
oskardiazdeleon9-Oct-06 17:26
oskardiazdeleon9-Oct-06 17:26 
Questionexecuting an PHP file on the webserver [modified] Pin
asamay9-Oct-06 15:00
asamay9-Oct-06 15:00 
AnswerRe: executing an PHP file on the webserver Pin
mikone9-Oct-06 21:49
mikone9-Oct-06 21:49 
GeneralRe: executing an PHP file on the webserver Pin
asamay10-Oct-06 6:37
asamay10-Oct-06 6:37 
QuestionInterface with MSN Messenger Pin
cdenvir9-Oct-06 13:51
cdenvir9-Oct-06 13:51 
QuestionSetting Desktop Wallpaper Pin
monrobot139-Oct-06 13:34
monrobot139-Oct-06 13:34 

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.