T
Test0Man
Hey,
I've built a small email application(I use the System.Web.Mail
namespace), when I send the email/emails with attachments they work
very well, my network technician says its works pretty well, expect
that there is no disconnect, my program simple just shuts down. I was
wondering if there isnt any way to tell the server that we are quiting
and done sending. It seems I dont send any quit command so that the
smtp server releases my connection.
Base of the code:
SmtpMail.SmtpServer = "myMailserver.com";
MailMessage mail = new MailMessage();
mail.To = this.smtpTo.Text;
mail.Cc = this.stmpCC.Text;
mail.Bcc = this.stmpBCC.Text;
mail.From = this.smtpFrom.Text;
mail.Subject = this.stmpSubject.Text;
mail.Body = this.MessageBox.Text;
MailAttachment attachment = new MailAttachment(AttachmentBox.Text);
mail.Attachments.Add(attachment);
SmtpMail.Send(mail);
Best Regards
I've built a small email application(I use the System.Web.Mail
namespace), when I send the email/emails with attachments they work
very well, my network technician says its works pretty well, expect
that there is no disconnect, my program simple just shuts down. I was
wondering if there isnt any way to tell the server that we are quiting
and done sending. It seems I dont send any quit command so that the
smtp server releases my connection.
Base of the code:
SmtpMail.SmtpServer = "myMailserver.com";
MailMessage mail = new MailMessage();
mail.To = this.smtpTo.Text;
mail.Cc = this.stmpCC.Text;
mail.Bcc = this.stmpBCC.Text;
mail.From = this.smtpFrom.Text;
mail.Subject = this.stmpSubject.Text;
mail.Body = this.MessageBox.Text;
MailAttachment attachment = new MailAttachment(AttachmentBox.Text);
mail.Attachments.Add(attachment);
SmtpMail.Send(mail);
Best Regards