xref: /netbsd-src/external/ibm-public/postfix/dist/src/global/post_mail.h (revision 33881f779a77dce6440bdc44610d94de75bebefe)
1 /*	$NetBSD: post_mail.h,v 1.3 2020/03/18 19:05:16 christos Exp $	*/
2 
3 #ifndef _POST_MAIL_H_INCLUDED_
4 #define _POST_MAIL_H_INCLUDED_
5 
6 /*++
7 /* NAME
8 /*	post_mail 3h
9 /* SUMMARY
10 /*	convenient mail posting interface
11 /* SYNOPSIS
12 /*	#include <post_mail.h>
13 /* DESCRIPTION
14 /* .nf
15 
16  /*
17   * Utility library.
18   */
19 #include <vstream.h>
20 #include <vstring.h>
21 
22  /*
23   * Global library.
24   */
25 #include <cleanup_user.h>
26 #include <mail_proto.h>
27 #include <smtputf8.h>
28 #include <int_filt.h>
29 
30  /*
31   * External interface.
32   */
33 typedef void (*POST_MAIL_NOTIFY) (VSTREAM *, void *);
34 extern VSTREAM *post_mail_fopen(const char *, const char *, int, int, int, VSTRING *);
35 extern VSTREAM *post_mail_fopen_nowait(const char *, const char *, int, int, int, VSTRING *);
36 extern void post_mail_fopen_async(const char *, const char *, int, int, int, VSTRING *, POST_MAIL_NOTIFY, void *);
37 extern int PRINTFLIKE(2, 3) post_mail_fprintf(VSTREAM *, const char *,...);
38 extern int post_mail_fputs(VSTREAM *, const char *);
39 extern int post_mail_buffer(VSTREAM *, const char *, int);
40 extern int post_mail_fclose(VSTREAM *);
41 typedef void (*POST_MAIL_FCLOSE_NOTIFY) (int, void *);
42 extern void post_mail_fclose_async(VSTREAM *, POST_MAIL_FCLOSE_NOTIFY, void *);
43 
44 #define POST_MAIL_BUFFER(v, b) \
45 	post_mail_buffer((v), vstring_str(b), VSTRING_LEN(b))
46 
47 /* LICENSE
48 /* .ad
49 /* .fi
50 /*	The Secure Mailer license must be distributed with this software.
51 /* AUTHOR(S)
52 /*	Wietse Venema
53 /*	IBM T.J. Watson Research
54 /*	P.O. Box 704
55 /*	Yorktown Heights, NY 10598, USA
56 /*
57 /*	Wietse Venema
58 /*	Google, Inc.
59 /*	111 8th Avenue
60 /*	New York, NY 10011, USA
61 /*--*/
62 
63 #endif
64