SMTP error code 213

S

sujit

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
 
F

Fred Zwarts

sujit said:
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?

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.)
 
J

Jorgen Grahn

....

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
 
P

Pascal J. Bourguignon

Fred Zwarts said:
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
};
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top