Click here to Skip to main content
15,886,799 members
Home / Discussions / C#
   

C#

 
AnswerRe: TextBox Focus Pin
rah_sin9-Oct-06 21:31
professionalrah_sin9-Oct-06 21:31 
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 
Hi all,

I need to know how to authenticate a user before sending a mail using a
C# application. The authentication should be done after sending mail order is initiated. or in other case if possible i need to know how to get the user name and password from the session that the user is signed in to.

The source code i use is this:

private void sendMailButton_Click(object sender, EventArgs e)
{
try
{
MailMessage mailMessage = new
MailMessage(toTextBox.Text, fromTextBox.Text, subjectTextBox.Text,
bodyTextBox.Text);

SmtpClient obj = new SmtpClient(SMTPTextBox.Text);
obj.Send(mailMessage);
MessageBox.Show("Message Sent");

}
catch (Exception ex)
{
MessageBox.Show("message not sent");

}
}

I need to add the authentication part. This is working but with no
authentication for the user or the mail sender address. I am using a
local SMTP server.
Thanks,


Jamil abou khalil
AnswerRe: How to send a mail with authentication Pin
Ashish Derhgawen10-Oct-06 6:17
Ashish Derhgawen10-Oct-06 6:17 
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 

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.