Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SMTP error code 213

0 views
Skip to first unread message

sujit

unread,
Jul 1, 2009, 8:05:49 AM7/1/09
to
Hi,

I am getting error code 213 from SMTP server. What does it mean?

I gone through some material on web and it looks like
2 - first digit- indicates success
1- second digit - indicates informational message
3 - third digit - Not too sure what does it mean

From web I got refs for other error codes like
200 (nonstandard success response, see rfc876)
211 System status, or system help reply
214 Help message
220 <domain> Service ready
221 <domain> Service closing transmission channel
250 Requested mail action okay, completed
251 User not local; will forward to <forward-path>

But nothing for error code 213.

Can anyone help me with
1. Understanding what RFC is implemented by my SMTP implementer
2. Is there any RFC which specifies and describes 213 as some
meaningful error code. If yes what is RFC number?


Can i safely ignore this smtp error code without any issues. Can i
code something like
if ( smtp_error_code%100==2 )
//ignore error
else
//do some error handling

Is such kind of code normal protocol when you are sending emails
programmatic by using smtp?

Thanks
-Sujit

Pascal J. Bourguignon

unread,
Jul 1, 2009, 8:19:51 AM7/1/09
to
sujit <sujitku...@gmail.com> writes:

> Hi,
>
> I am getting error code 213 from SMTP server. What does it mean?
>
> I gone through some material on web and it looks like
> 2 - first digit- indicates success
> 1- second digit - indicates informational message
> 3 - third digit - Not too sure what does it mean
>
> From web I got refs for other error codes like
> 200 (nonstandard success response, see rfc876)
> 211 System status, or system help reply
> 214 Help message
> 220 <domain> Service ready
> 221 <domain> Service closing transmission channel
> 250 Requested mail action okay, completed
> 251 User not local; will forward to <forward-path>
>
> But nothing for error code 213.
>
> Can anyone help me with
> 1. Understanding what RFC is implemented by my SMTP implementer

SMTP is RFC2821, but there are a number of options documented in
additionnal RFCs.

> 2. Is there any RFC which specifies and describes 213 as some
> meaningful error code. If yes what is RFC number?

See section '4.2 SMTP Replies' in RFC2821.


> Can i safely ignore this smtp error code without any issues. Can i
> code something like
> if ( smtp_error_code%100==2 )
> //ignore error
> else
> //do some error handling
>
> Is such kind of code normal protocol when you are sending emails
> programmatic by using smtp?

Yes, any status starting with '2' means success so you can ignore the
details and go on.

--
__Pascal Bourguignon__

Fred Zwarts

unread,
Jul 1, 2009, 11:27:22 AM7/1/09
to
"sujit" <sujitku...@gmail.com> wrote in message news:652a58ab-bca2-4e69...@c36g2000yqn.googlegroups.com...

Since this is a C++ newsgroup, I will only go into the C++ part.
Shouldn't
if ( smtp_error_code%100==2 )
be changed into
if ( smtp_error_code/100==2 )
?
Ignoring the possibility that smtp_error_code > 999.
Maybe it is even better to change it into a switch like

switch (smtp_error_code/100) {
case 2:
// Success

case 4:
// Temporary failure, retry later

case 5:
// Definite failure, don't retry.

default:
// Unexpected response

}

(There may be more cases, but you get the idea.)

Jorgen Grahn

unread,
Jul 1, 2009, 5:56:35 PM7/1/09
to
On Wed, 01 Jul 2009 14:19:51 +0200, Pascal J. Bourguignon <p...@informatimago.com> wrote:
> sujit <sujitku...@gmail.com> writes:
>
>> Hi,
>>
>> I am getting error code 213 from SMTP server. What does it mean?
...

> SMTP is RFC2821, but there are a number of options documented in
> additionnal RFCs.

Actually, 2821 has already been obsoleted, by 5321.

All of this is completely offtopic of course. comp.lang.c++ is
probably one of the *worst* places possible for SMTP questions.

The poster should try one of the comp.mail.* groups, possibly
comp.mail.sendmail if that is its name, or comp.mail.headers.

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .

Pascal J. Bourguignon

unread,
Jul 2, 2009, 4:40:34 AM7/2/09
to
"Fred Zwarts" <F.Zw...@KVI.nl> writes:

> "sujit" <sujitku...@gmail.com> wrote in message news:652a58ab-bca2-4e69...@c36g2000yqn.googlegroups.com...
>> Hi,
>>
>> I am getting error code 213 from SMTP server. What does it mean?
>>
>> I gone through some material on web and it looks like
>> 2 - first digit- indicates success
>> 1- second digit - indicates informational message
>> 3 - third digit - Not too sure what does it mean
>>

>> Can i safely ignore this smtp error code without any issues. Can i
>> code something like
>> if ( smtp_error_code%100==2 )
>> //ignore error
>> else
>> //do some error handling
>>
>> Is such kind of code normal protocol when you are sending emails
>> programmatic by using smtp?
>
> Since this is a C++ newsgroup, I will only go into the C++ part.
> Shouldn't
> if ( smtp_error_code%100==2 )
> be changed into
> if ( smtp_error_code/100==2 )
> ?
> Ignoring the possibility that smtp_error_code > 999.

Well if we go this way, status codes are not numbers, they're a
sequence of three digit characters. In C++, they shouldn't be
represented as an int, but as:


class InvalidStatusCode : public std:exception {
public:
InvalidStatusCode(const char* message);
};


class StatusCode {
private:
std::string digits;
public:
StatusCode(std::string code) throw (InvalidStatusCode);
StatusCode(const char* buffer) throw (InvalidStatusCode);

char responseStatus(); // the first digit
bool isPositivePreliminaryReply();
bool isPositiveCompletionReply();
bool isPositiveImmediateReply();
bool isTransentNegativeCompletionReply();
bool isPermanentnegativeCompletionReply();
bool isUnexpectedReply();

char responseCategory(); // the second digit
bool isSyntaxError();
bool isInformationCategory();
bool isConnectionCategory;
bool isMailSystemCategory();
bool isUnexpectedCategory();

char responseSubCategory(); // the third digit
};


--
__Pascal Bourguignon__

0 new messages