3
0

mail.h 937 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * helper routines
  4. *
  5. * Copyright (C) 2008 by Vladimir Dronnikov <dronnikov@gmail.com>
  6. *
  7. * Licensed under GPLv2, see file LICENSE in this source tree.
  8. */
  9. struct globals {
  10. pid_t helper_pid;
  11. unsigned timeout;
  12. unsigned verbose;
  13. char *user;
  14. char *pass;
  15. FILE *fp0; // initial stdin
  16. char *opt_charset;
  17. };
  18. #define G (*ptr_to_globals)
  19. #define INIT_G() do { \
  20. SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
  21. G.opt_charset = (char *)CONFIG_FEATURE_MIME_CHARSET; \
  22. } while (0)
  23. //char FAST_FUNC *parse_url(char *url, char **user, char **pass);
  24. void launch_helper(const char **argv) FAST_FUNC;
  25. void get_cred_or_die(int fd) FAST_FUNC;
  26. void send_r_n(const char *s) FAST_FUNC;
  27. char *send_mail_command(const char *fmt, const char *param) FAST_FUNC;
  28. void printbuf_base64(const char *buf, unsigned len) FAST_FUNC;
  29. void printstr_base64(const char *buf) FAST_FUNC;
  30. void printfile_base64(const char *fname) FAST_FUNC;