Click here to Skip to main content
15,892,005 members
Home / Discussions / C#
   

C#

 
GeneralRe: DataTable row column lookup possiblity? Pin
Blubbo2-Jun-10 2:07
Blubbo2-Jun-10 2:07 
AnswerRe: DataTable row column lookup possiblity? Pin
PIEBALDconsult1-Jun-10 13:31
mvePIEBALDconsult1-Jun-10 13:31 
AnswerRe: DataTable row column lookup possiblity? Pin
AspDotNetDev1-Jun-10 17:58
protectorAspDotNetDev1-Jun-10 17:58 
GeneralRe: DataTable row column lookup possiblity? Pin
Blubbo2-Jun-10 2:08
Blubbo2-Jun-10 2:08 
QuestionSend mail through SMTP server Pin
loyal ginger1-Jun-10 7:02
loyal ginger1-Jun-10 7:02 
AnswerRe: Send mail through SMTP server Pin
Abhinav S1-Jun-10 7:52
Abhinav S1-Jun-10 7:52 
GeneralRe: Send mail through SMTP server Pin
loyal ginger1-Jun-10 8:51
loyal ginger1-Jun-10 8:51 
AnswerRe: Send mail through SMTP server Pin
OriginalGriff1-Jun-10 8:22
mveOriginalGriff1-Jun-10 8:22 
The suggestion made by Abhinav may help; if it does not, then:
SmtpClient implements IDisposable so it may be that the email is sent when the client is disposed. This would give the symptoms you describe, at least in terms of the send-when-application-closed problem. Try wraping your section in a using block.
using (SmtpClient client = new SmtpClient(smtp_server.Text))
   {
   MailMessage message = new MailMessage(send_from.Text, send_to.Text);
   message.Body = mail_body.Text;
   message.Subject = mail_subject.Text;
   client.Send(message);
   message.Dispose();
   }

Did you know:
That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.

GeneralRe: Send mail through SMTP server Pin
loyal ginger1-Jun-10 8:33
loyal ginger1-Jun-10 8:33 
GeneralRe: Send mail through SMTP server Pin
OriginalGriff1-Jun-10 8:41
mveOriginalGriff1-Jun-10 8:41 
GeneralRe: Send mail through SMTP server Pin
Luc Pattyn1-Jun-10 9:11
sitebuilderLuc Pattyn1-Jun-10 9:11 
GeneralRe: Send mail through SMTP server Pin
loyal ginger1-Jun-10 8:48
loyal ginger1-Jun-10 8:48 
GeneralRe: Send mail through SMTP server Pin
OriginalGriff1-Jun-10 8:54
mveOriginalGriff1-Jun-10 8:54 
GeneralRe: Send mail through SMTP server Pin
loyal ginger1-Jun-10 9:14
loyal ginger1-Jun-10 9:14 
GeneralRe: Send mail through SMTP server Pin
Luc Pattyn1-Jun-10 9:59
sitebuilderLuc Pattyn1-Jun-10 9:59 
QuestionFile.Open strange behaviour Pin
ds411-Jun-10 6:46
ds411-Jun-10 6:46 
AnswerRe: File.Open strange behaviour Pin
#realJSOP1-Jun-10 7:38
mve#realJSOP1-Jun-10 7:38 
Questioncount words of office file Pin
jojoba20111-Jun-10 5:54
jojoba20111-Jun-10 5:54 
AnswerRe: count words of office file PinPopular
OriginalGriff1-Jun-10 5:56
mveOriginalGriff1-Jun-10 5:56 
GeneralRe: count words of office file Pin
Luc Pattyn1-Jun-10 6:52
sitebuilderLuc Pattyn1-Jun-10 6:52 
AnswerRe: count words of office file Pin
PIEBALDconsult1-Jun-10 5:57
mvePIEBALDconsult1-Jun-10 5:57 
QuestionRe: count words of office file Pin
jojoba20111-Jun-10 6:10
jojoba20111-Jun-10 6:10 
AnswerRe: count words of office file Pin
hammerstein051-Jun-10 6:34
hammerstein051-Jun-10 6:34 
Questioncount words of office file Pin
jojoba20111-Jun-10 7:09
jojoba20111-Jun-10 7:09 
AnswerRe: count words of office file Pin
Not Active1-Jun-10 7:17
mentorNot Active1-Jun-10 7:17 

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.