This project is read-only.

problem about smtpclient

May 16, 2010 at 4:03 PM

Hi, higty

I downloaded the csharpmail-44711 and tried sending a mail with SmtpClient, but it seemed always been time-out while sending the mail content. I checked the code and found the following code in SmtpClient.SendMail

                rs = this.ExecuteData();
                if (rs.StatusCode == SmtpCommandResultCode.StartMailInput)
                  this.SendCommand(text + MailParser.NewLine);   
                    return r;
                rs = this.ExecuteQuit();
It seems the ending character indicated in the response of DATA command is not used, and I modified a line (I got that "." is used as ending character from the response of DATA command in dubuging)
this.SendCommand(text + MailParser.NewLine+".");
and it sent a mail successfully.
Since I don't have much experience on SMTP, will it be a bug or some design consideration?
Hope your reply.
May 17, 2010 at 3:40 PM

You are completely right.
It is a bug.Oh my god (>_<)

Thank you.