12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- #ifndef HEADER_CURL_SMTP_H
- #define HEADER_CURL_SMTP_H
- #include "pingpong.h"
- #include "curl_sasl.h"
- typedef enum {
- SMTP_STOP,
- SMTP_SERVERGREET,
- SMTP_EHLO,
- SMTP_HELO,
- SMTP_STARTTLS,
- SMTP_UPGRADETLS,
- SMTP_AUTH,
- SMTP_COMMAND,
- SMTP_MAIL,
- SMTP_RCPT,
- SMTP_DATA,
- SMTP_POSTDATA,
- SMTP_QUIT,
- SMTP_LAST
- } smtpstate;
- struct SMTP {
- curl_pp_transfer transfer;
- char *custom;
- struct curl_slist *rcpt;
- size_t eob;
- bool trailing_crlf;
- };
- struct smtp_conn {
- struct pingpong pp;
- smtpstate state;
- bool ssldone;
- char *domain;
- struct SASL sasl;
- bool tls_supported;
- bool size_supported;
- bool auth_supported;
- };
- extern const struct Curl_handler Curl_handler_smtp;
- extern const struct Curl_handler Curl_handler_smtps;
- #define SMTP_EOB "\x0d\x0a\x2e\x0d\x0a"
- #define SMTP_EOB_LEN 5
- #define SMTP_EOB_FIND_LEN 3
- #define SMTP_EOB_REPL "\x0d\x0a\x2e\x2e"
- #define SMTP_EOB_REPL_LEN 4
- CURLcode Curl_smtp_escape_eob(struct connectdata *conn, const ssize_t nread);
- #endif
|