Click here to Skip to main content
15,902,938 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to find File from C# code Pin
Nick Parker6-Aug-04 3:04
protectorNick Parker6-Aug-04 3:04 
AnswerRe: How to find File from C# code Pin
Looney Tunezez6-Aug-04 10:29
Looney Tunezez6-Aug-04 10:29 
GeneralTrace in .NET remoting Pin
Md Saleem Navalur5-Aug-04 23:05
Md Saleem Navalur5-Aug-04 23:05 
GeneralRe: Trace in .NET remoting Pin
Heath Stewart6-Aug-04 4:49
protectorHeath Stewart6-Aug-04 4:49 
GeneralSpliting Controls Pin
sreejith ss nair5-Aug-04 23:01
sreejith ss nair5-Aug-04 23:01 
GeneralRe: Spliting Controls Pin
Heath Stewart6-Aug-04 4:51
protectorHeath Stewart6-Aug-04 4:51 
Questionhow to send an e-mail to hotmail??? Pin
shdelpiero5-Aug-04 22:40
shdelpiero5-Aug-04 22:40 
AnswerRe: how to send an e-mail to hotmail??? Pin
sreejith ss nair5-Aug-04 23:20
sreejith ss nair5-Aug-04 23:20 
hi there,

if you want to send emails to any mailserver then you have to use a namespace called
System.Web.Mail.

After that you can use SmtpMail Class which contain a static method called SmtpMail.Send().
You can overload this method in two different ways.

1. You can directly pass required parameter for sending mails in that Smtp.Send() method.

Eg.

string from="Yourname@hotmail.com",to="qqq@hotmail.com",subject="hi hi",message="ha ha ha";

SmtpMail.Send(from,to,sunject,message);
//this line of code will send mail to your friend.


Here we won't get that much flexibility to compose our message part. If you want to use nicely formated body and message part. then you need to go for the second fasion(next example).

2. use MailMessage class to create mail.

eg. MailMessage Msg=new MailMessage()

After creating object of MailMessage class you are absolutly free to give what ever modification that you wan.
Please check the members avilable in our Msg object. All are self explanatory
and then use

Smtp.Send(Msg)


Bfore sending mails don't forget to give your Smtpmailserver name.

eg:

SmtpMail.SmtpServer="YourSmtpServerName";

bye

**************************
S r e e j i t h N a i r
**************************
GeneralRe: how to send an e-mail to hotmail??? Pin
Heath Stewart6-Aug-04 4:55
protectorHeath Stewart6-Aug-04 4:55 
Questionhow to close the form after specific time?? Pin
shdelpiero5-Aug-04 22:27
shdelpiero5-Aug-04 22:27 
AnswerRe: how to close the form after specific time?? Pin
Colin Angus Mackay5-Aug-04 22:55
Colin Angus Mackay5-Aug-04 22:55 
GeneralRe: how to close the form after specific time?? Pin
exhaulted6-Aug-04 0:41
exhaulted6-Aug-04 0:41 
GeneralColor Pin
sreejith ss nair5-Aug-04 21:56
sreejith ss nair5-Aug-04 21:56 
GeneralRe: Color Pin
sreejith ss nair6-Aug-04 1:35
sreejith ss nair6-Aug-04 1:35 
GeneralRe: Color Pin
Colin Angus Mackay6-Aug-04 3:59
Colin Angus Mackay6-Aug-04 3:59 
GeneralRe: Color Pin
Heath Stewart6-Aug-04 4:58
protectorHeath Stewart6-Aug-04 4:58 
GeneralRe: Color Pin
Colin Angus Mackay6-Aug-04 5:24
Colin Angus Mackay6-Aug-04 5:24 
GeneralRe: Color Pin
sreejith ss nair6-Aug-04 18:45
sreejith ss nair6-Aug-04 18:45 
GeneralRe: Color Pin
Colin Angus Mackay6-Aug-04 23:41
Colin Angus Mackay6-Aug-04 23:41 
GeneralRe: Color Pin
sreejith ss nair8-Aug-04 17:47
sreejith ss nair8-Aug-04 17:47 
GeneralRe: Color Pin
sreejith ss nair8-Aug-04 17:55
sreejith ss nair8-Aug-04 17:55 
Generalsetting directory permissions Pin
Gavin Jeffrey5-Aug-04 21:18
Gavin Jeffrey5-Aug-04 21:18 
GeneralRe: setting directory permissions Pin
Heath Stewart6-Aug-04 5:02
protectorHeath Stewart6-Aug-04 5:02 
GeneralRe: setting directory permissions Pin
Gavin Jeffrey16-Aug-04 3:22
Gavin Jeffrey16-Aug-04 3:22 
GeneralReflection Question Pin
Angel Reyes5-Aug-04 17:42
Angel Reyes5-Aug-04 17:42 

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.