2004-11-26 [colin] 0.9.12cvs173.1
[claws.git] / src / common / smtp.h
index be2e812e2d4f372294d407c8ebc8c7b5f24f6e2f..b813ae68cf366b9edaef343c8c4e62b322b4fe62 100644 (file)
@@ -34,14 +34,20 @@ typedef struct _SMTPSession SMTPSession;
 
 #define MSGBUFSIZE             8192
 
-#define        SM_OK                   0
-#define        SM_ERROR                128
-#define        SM_UNRECOVERABLE        129
-#define SM_AUTHFAIL            130
+typedef enum
+{
+       SM_OK                   = 0,
+       SM_ERROR                = 128,
+       SM_UNRECOVERABLE        = 129,
+       SM_AUTHFAIL             = 130
+} SMTPErrorValue;
 
-#define        ESMTP_8BITMIME          0x01
-#define        ESMTP_SIZE              0x02
-#define        ESMTP_ETRN              0x04
+typedef enum
+{
+       ESMTP_8BITMIME  = 1 << 0,
+       ESMTP_SIZE      = 1 << 1,
+       ESMTP_ETRN      = 1 << 2
+} ESMTPFlag;
 
 typedef enum
 {
@@ -97,9 +103,15 @@ struct _SMTPSession
        guchar *send_data;
        guint send_data_len;
 
+       gint max_message_size;
+
        SMTPAuthType avail_auth_type;
        SMTPAuthType forced_auth_type;
        SMTPAuthType auth_type;
+
+       SMTPErrorValue error_val;
+       gchar *error_msg;
+       gboolean is_esmtp;
 };
 
 Session *smtp_session_new      (void);