Improve smtp sending functions.
* include/mailutils/smtp.h (mu_smtp_write): Mark as printf-like. (mu_smtp_mail_basic, mu_smtp_rcpt_basic): Take variable number of arguments. Mark as printf-like. (mu_smtp_data): New prototype. * include/mailutils/sys/smtp.h (_MU_SMTP_SAVEBUF): New flag. (_mu_smtp) <savebuf>: New member. (_mu_smtp_data_begin, _mu_smtp_data_end): New protos. * libproto/mailer/smtp_send.c: New file. * libproto/mailer/smtp_data.c (_mu_smtp_data_begin) (_mu_smtp_data_end, mu_smtp_data): New functions. * libproto/mailer/Makefile.am (libmu_mailer_la_SOURCES): Add smtp_send.c. * libproto/mailer/smtp_ehlo.c (mu_smtp_ehlo): Switch to MU_SMTP_EHLO only if in MU_SMTP_MAIL state. * libproto/mailer/smtp_mail.c (mu_smtp_mail_basic): Take variable number of arguments. * libproto/mailer/smtp_param.c (mu_smtp_get_param): Add missing typecast. * libproto/mailer/smtp_rcpt.c (mu_smtp_rcpt_basic): Take variable number of arguments. * libproto/mailer/smtp_send.c (_smtp_data_send): Use _mu_smtp_data_begin and _mu_smtp_data_end. * testsuite/smtpsend.c: Emulate sending from a MU message.
Showing
10 changed files
with
243 additions
and
60 deletions
libproto/mailer/smtp_send.c
0 → 100644
-
Please register or sign in to post a comment