Macros | Functions | Variables
smtp.c File Reference
#include "curl_setup.h"
#include <curl/curl.h>
#include "urldata.h"
#include "sendf.h"
#include "hostip.h"
#include "progress.h"
#include "transfer.h"
#include "escape.h"
#include "http.h"
#include "mime.h"
#include "socks.h"
#include "smtp.h"
#include "strtoofft.h"
#include "strcase.h"
#include "vtls/vtls.h"
#include "connect.h"
#include "strerror.h"
#include "select.h"
#include "multiif.h"
#include "url.h"
#include "curl_gethostname.h"
#include "curl_sasl.h"
#include "warnless.h"
#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"
Include dependency graph for smtp.c:

Go to the source code of this file.

Macros

#define smtp_to_smtps(x)   Curl_nop_stmt
 

Functions

CURLcode Curl_smtp_escape_eob (struct connectdata *conn, const ssize_t nread)
 
static CURLcode smtp_block_statemach (struct connectdata *conn)
 
static CURLcode smtp_connect (struct connectdata *conn, bool *done)
 
static CURLcode smtp_continue_auth (struct connectdata *conn, const char *resp)
 
static CURLcode smtp_disconnect (struct connectdata *conn, bool dead)
 
static CURLcode smtp_do (struct connectdata *conn, bool *done)
 
static CURLcode smtp_doing (struct connectdata *conn, bool *dophase_done)
 
static CURLcode smtp_done (struct connectdata *conn, CURLcode status, bool premature)
 
static CURLcode smtp_dophase_done (struct connectdata *conn, bool connected)
 
static bool smtp_endofresp (struct connectdata *conn, char *line, size_t len, int *resp)
 
static void smtp_get_message (char *buffer, char **outptr)
 
static int smtp_getsock (struct connectdata *conn, curl_socket_t *socks, int numsocks)
 
static CURLcode smtp_init (struct connectdata *conn)
 
static CURLcode smtp_multi_statemach (struct connectdata *conn, bool *done)
 
static CURLcode smtp_parse_custom_request (struct connectdata *conn)
 
static CURLcode smtp_parse_url_options (struct connectdata *conn)
 
static CURLcode smtp_parse_url_path (struct connectdata *conn)
 
static CURLcode smtp_perform (struct connectdata *conn, bool *connected, bool *dophase_done)
 
static CURLcode smtp_perform_auth (struct connectdata *conn, const char *mech, const char *initresp)
 
static CURLcode smtp_perform_authentication (struct connectdata *conn)
 
static CURLcode smtp_perform_command (struct connectdata *conn)
 
static CURLcode smtp_perform_ehlo (struct connectdata *conn)
 
static CURLcode smtp_perform_helo (struct connectdata *conn)
 
static CURLcode smtp_perform_mail (struct connectdata *conn)
 
static CURLcode smtp_perform_quit (struct connectdata *conn)
 
static CURLcode smtp_perform_rcpt_to (struct connectdata *conn)
 
static CURLcode smtp_perform_starttls (struct connectdata *conn)
 
static CURLcode smtp_perform_upgrade_tls (struct connectdata *conn)
 
static CURLcode smtp_regular_transfer (struct connectdata *conn, bool *done)
 
static CURLcode smtp_setup_connection (struct connectdata *conn)
 
static CURLcode smtp_state_auth_resp (struct connectdata *conn, int smtpcode, smtpstate instate)
 
static CURLcode smtp_state_command_resp (struct connectdata *conn, int smtpcode, smtpstate instate)
 
static CURLcode smtp_state_data_resp (struct connectdata *conn, int smtpcode, smtpstate instate)
 
static CURLcode smtp_state_ehlo_resp (struct connectdata *conn, int smtpcode, smtpstate instate)
 
static CURLcode smtp_state_helo_resp (struct connectdata *conn, int smtpcode, smtpstate instate)
 
static CURLcode smtp_state_mail_resp (struct connectdata *conn, int smtpcode, smtpstate instate)
 
static CURLcode smtp_state_postdata_resp (struct connectdata *conn, int smtpcode, smtpstate instate)
 
static CURLcode smtp_state_rcpt_resp (struct connectdata *conn, int smtpcode, smtpstate instate)
 
static CURLcode smtp_state_servergreet_resp (struct connectdata *conn, int smtpcode, smtpstate instate)
 
static CURLcode smtp_state_starttls_resp (struct connectdata *conn, int smtpcode, smtpstate instate)
 
static CURLcode smtp_statemach_act (struct connectdata *conn)
 
static void state (struct connectdata *conn, smtpstate newstate)
 

Variables

const struct Curl_handler Curl_handler_smtp
 
static const struct SASLproto saslsmtp
 

Macro Definition Documentation

#define smtp_to_smtps (   x)    Curl_nop_stmt

Definition at line 184 of file smtp.c.

Function Documentation

CURLcode Curl_smtp_escape_eob ( struct connectdata conn,
const ssize_t  nread 
)

Definition at line 1533 of file smtp.c.

static CURLcode smtp_block_statemach ( struct connectdata conn)
static

Definition at line 1082 of file smtp.c.

static CURLcode smtp_connect ( struct connectdata conn,
bool done 
)
static

Definition at line 1125 of file smtp.c.

static CURLcode smtp_continue_auth ( struct connectdata conn,
const char *  resp 
)
static

Definition at line 420 of file smtp.c.

static CURLcode smtp_disconnect ( struct connectdata conn,
bool  dead 
)
static

Definition at line 1339 of file smtp.c.

static CURLcode smtp_do ( struct connectdata conn,
bool done 
)
static

Definition at line 1316 of file smtp.c.

static CURLcode smtp_doing ( struct connectdata conn,
bool dophase_done 
)
static

Definition at line 1380 of file smtp.c.

static CURLcode smtp_done ( struct connectdata conn,
CURLcode  status,
bool  premature 
)
static

Definition at line 1175 of file smtp.c.

static CURLcode smtp_dophase_done ( struct connectdata conn,
bool  connected 
)
static

Definition at line 1366 of file smtp.c.

static bool smtp_endofresp ( struct connectdata conn,
char *  line,
size_t  len,
int *  resp 
)
static

Definition at line 195 of file smtp.c.

static void smtp_get_message ( char *  buffer,
char **  outptr 
)
static

Definition at line 233 of file smtp.c.

static int smtp_getsock ( struct connectdata conn,
curl_socket_t socks,
int  numsocks 
)
static

Definition at line 1109 of file smtp.c.

static CURLcode smtp_init ( struct connectdata conn)
static

Definition at line 1095 of file smtp.c.

static CURLcode smtp_multi_statemach ( struct connectdata conn,
bool done 
)
static

Definition at line 1065 of file smtp.c.

static CURLcode smtp_parse_custom_request ( struct connectdata conn)
static

Definition at line 1519 of file smtp.c.

static CURLcode smtp_parse_url_options ( struct connectdata conn)
static

Definition at line 1454 of file smtp.c.

static CURLcode smtp_parse_url_path ( struct connectdata conn)
static

Definition at line 1493 of file smtp.c.

static CURLcode smtp_perform ( struct connectdata conn,
bool connected,
bool dophase_done 
)
static

Definition at line 1265 of file smtp.c.

static CURLcode smtp_perform_auth ( struct connectdata conn,
const char *  mech,
const char *  initresp 
)
static

Definition at line 395 of file smtp.c.

static CURLcode smtp_perform_authentication ( struct connectdata conn)
static

Definition at line 434 of file smtp.c.

static CURLcode smtp_perform_command ( struct connectdata conn)
static

Definition at line 470 of file smtp.c.

static CURLcode smtp_perform_ehlo ( struct connectdata conn)
static

Definition at line 299 of file smtp.c.

static CURLcode smtp_perform_helo ( struct connectdata conn)
static

Definition at line 325 of file smtp.c.

static CURLcode smtp_perform_mail ( struct connectdata conn)
static

Definition at line 499 of file smtp.c.

static CURLcode smtp_perform_quit ( struct connectdata conn)
static

Definition at line 634 of file smtp.c.

static CURLcode smtp_perform_rcpt_to ( struct connectdata conn)
static

Definition at line 609 of file smtp.c.

static CURLcode smtp_perform_starttls ( struct connectdata conn)
static

Definition at line 348 of file smtp.c.

static CURLcode smtp_perform_upgrade_tls ( struct connectdata conn)
static

Definition at line 367 of file smtp.c.

static CURLcode smtp_regular_transfer ( struct connectdata conn,
bool done 
)
static

Definition at line 1404 of file smtp.c.

static CURLcode smtp_setup_connection ( struct connectdata conn)
static

Definition at line 1430 of file smtp.c.

static CURLcode smtp_state_auth_resp ( struct connectdata conn,
int  smtpcode,
smtpstate  instate 
)
static

Definition at line 807 of file smtp.c.

static CURLcode smtp_state_command_resp ( struct connectdata conn,
int  smtpcode,
smtpstate  instate 
)
static

Definition at line 836 of file smtp.c.

static CURLcode smtp_state_data_resp ( struct connectdata conn,
int  smtpcode,
smtpstate  instate 
)
static

Definition at line 934 of file smtp.c.

static CURLcode smtp_state_ehlo_resp ( struct connectdata conn,
int  smtpcode,
smtpstate  instate 
)
static

Definition at line 692 of file smtp.c.

static CURLcode smtp_state_helo_resp ( struct connectdata conn,
int  smtpcode,
smtpstate  instate 
)
static

Definition at line 787 of file smtp.c.

static CURLcode smtp_state_mail_resp ( struct connectdata conn,
int  smtpcode,
smtpstate  instate 
)
static

Definition at line 882 of file smtp.c.

static CURLcode smtp_state_postdata_resp ( struct connectdata conn,
int  smtpcode,
smtpstate  instate 
)
static

Definition at line 962 of file smtp.c.

static CURLcode smtp_state_rcpt_resp ( struct connectdata conn,
int  smtpcode,
smtpstate  instate 
)
static

Definition at line 902 of file smtp.c.

static CURLcode smtp_state_servergreet_resp ( struct connectdata conn,
int  smtpcode,
smtpstate  instate 
)
static

Definition at line 648 of file smtp.c.

static CURLcode smtp_state_starttls_resp ( struct connectdata conn,
int  smtpcode,
smtpstate  instate 
)
static

Definition at line 668 of file smtp.c.

static CURLcode smtp_statemach_act ( struct connectdata conn)
static

Definition at line 979 of file smtp.c.

static void state ( struct connectdata conn,
smtpstate  newstate 
)
static

Definition at line 262 of file smtp.c.

Variable Documentation

const struct Curl_handler Curl_handler_smtp
Initial value:
= {
"SMTP",
}
static CURLcode smtp_multi_statemach(struct connectdata *conn, bool *done)
Definition: smtp.c:1065
#define PROTOPT_NOURLQUERY
Definition: urldata.h:711
static int smtp_getsock(struct connectdata *conn, curl_socket_t *socks, int numsocks)
Definition: smtp.c:1109
#define PORT_SMTP
Definition: urldata.h:45
static CURLcode smtp_doing(struct connectdata *conn, bool *dophase_done)
Definition: smtp.c:1380
#define ZERO_NULL
Definition: curlx.c:131
static CURLcode smtp_setup_connection(struct connectdata *conn)
Definition: smtp.c:1430
#define CURLPROTO_SMTP
Definition: curl.h:860
static CURLcode smtp_connect(struct connectdata *conn, bool *done)
Definition: smtp.c:1125
static CURLcode smtp_done(struct connectdata *conn, CURLcode status, bool premature)
Definition: smtp.c:1175
#define PROTOPT_URLOPTIONS
Definition: urldata.h:717
static CURLcode smtp_do(struct connectdata *conn, bool *done)
Definition: smtp.c:1316
#define PROTOPT_CLOSEACTION
Definition: urldata.h:702
static CURLcode smtp_disconnect(struct connectdata *conn, bool dead)
Definition: smtp.c:1339

Definition at line 113 of file smtp.c.

const struct SASLproto saslsmtp
static
Initial value:
= {
"smtp",
334,
235,
512 - 8,
}
static CURLcode smtp_continue_auth(struct connectdata *conn, const char *resp)
Definition: smtp.c:420
static CURLcode smtp_perform_auth(struct connectdata *conn, const char *mech, const char *initresp)
Definition: smtp.c:395
static void smtp_get_message(char *buffer, char **outptr)
Definition: smtp.c:233

Definition at line 164 of file smtp.c.



rc_tagdetect_client
Author(s): Monika Florek-Jasinska , Raphael Schaller
autogenerated on Sat Feb 13 2021 03:42:17