Click here to Skip to main content
15,918,808 members
Home / Discussions / C#
   

C#

 
GeneralSysteminformatiom.Network not working Pin
sharathgowda22-Feb-05 20:25
sharathgowda22-Feb-05 20:25 
GeneralCount no of Children in DirectoryEntry Pin
Adnan Siddiqi22-Feb-05 20:01
Adnan Siddiqi22-Feb-05 20:01 
GeneralRe: Count no of Children in DirectoryEntry Pin
kaangonel24-Feb-05 2:21
kaangonel24-Feb-05 2:21 
QuestionRichTextBox / TextBoxBase AppendText GCing like mad -- SetStyle isn't working? Pin
Rei Miyasaka22-Feb-05 16:22
Rei Miyasaka22-Feb-05 16:22 
AnswerRe: RichTextBox / TextBoxBase AppendText GCing like mad -- SetStyle isn't working? Pin
S. Senthil Kumar22-Feb-05 17:58
S. Senthil Kumar22-Feb-05 17:58 
GeneralRe: RichTextBox / TextBoxBase AppendText GCing like mad -- SetStyle isn't working? Pin
Rei Miyasaka22-Feb-05 18:08
Rei Miyasaka22-Feb-05 18:08 
GeneralOpen socket to a smtp server Pin
kokain22-Feb-05 15:49
kokain22-Feb-05 15:49 
GeneralRe: Open socket to a smtp server Pin
S. Senthil Kumar22-Feb-05 16:11
S. Senthil Kumar22-Feb-05 16:11 
Hi,

It is possible to do this with the Socket class or the TcpClient class. I'd suggest you go with the latter. As for sending strings, you can wrap the NetworkStream in a StreamWriter like this,

<br />
TcpClient tcpClient = new TcpClient("smtp_server_name", 25);<br />
tcpClient.Connect();<br />
using (StreamWriter s = new StreamWriter(tcpClient.GetStream());<br />
{<br />
   s.Write("HELO SERVER");<br />
}<br />


One thing you need to note is that the SMTP server need not have the same domain name as the webserver. For eg. mail.yahoo.com is the domain name for yahoomail webserver, but it is NOT a SMTP server. You then need to look for MX records.

Regards
Senthil
My Blog
GeneralRe: Open socket to a smtp server Pin
kokain22-Feb-05 16:29
kokain22-Feb-05 16:29 
GeneralRe: Open socket to a smtp server Pin
S. Senthil Kumar22-Feb-05 17:51
S. Senthil Kumar22-Feb-05 17:51 
GeneralPrinting rich text with a background color Pin
Anonymous22-Feb-05 11:29
Anonymous22-Feb-05 11:29 
GeneralRe: Printing rich text with a background color Pin
Rei Miyasaka23-Feb-05 0:50
Rei Miyasaka23-Feb-05 0:50 
GeneralThank you, but my problem is... Pin
JarrodPeace23-Feb-05 6:17
JarrodPeace23-Feb-05 6:17 
Generalset listBox item color Pin
Adnan Siddiqi22-Feb-05 9:19
Adnan Siddiqi22-Feb-05 9:19 
GeneralRe: set listBox item color Pin
Heath Stewart22-Feb-05 12:41
protectorHeath Stewart22-Feb-05 12:41 
GeneralRe: set listBox item color Pin
Adnan Siddiqi22-Feb-05 19:53
Adnan Siddiqi22-Feb-05 19:53 
GeneralLabel Click Event Location Pin
Dominic Farr22-Feb-05 8:42
Dominic Farr22-Feb-05 8:42 
GeneralRe: Label Click Event Location Pin
Heath Stewart22-Feb-05 12:40
protectorHeath Stewart22-Feb-05 12:40 
QuestionHow to create MainMenu Designer. Pin
xenophy22-Feb-05 8:06
xenophy22-Feb-05 8:06 
AnswerRe: How to create MainMenu Designer. Pin
Heath Stewart22-Feb-05 12:35
protectorHeath Stewart22-Feb-05 12:35 
GeneralIs it easy to migrate from VB.net to C# Pin
MyThread22-Feb-05 5:46
MyThread22-Feb-05 5:46 
GeneralRe: Is it easy to migrate from VB.net to C# Pin
Dave Kreskowiak22-Feb-05 6:15
mveDave Kreskowiak22-Feb-05 6:15 
GeneralRe: Is it easy to migrate from VB.net to C# Pin
MyThread22-Feb-05 6:44
MyThread22-Feb-05 6:44 
GeneralRe: Is it easy to migrate from VB.net to C# Pin
Rei Miyasaka22-Feb-05 16:24
Rei Miyasaka22-Feb-05 16:24 
GeneralRe: Is it easy to migrate from VB.net to C# Pin
SimonS22-Feb-05 8:09
SimonS22-Feb-05 8:09 

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.