/*++ /* NAME /* post_mail 3 /* SUMMARY /* convenient mail posting interface /* SYNOPSIS /* #include <post_mail.h> /* /* VSTREAM *post_mail_fopen(sender, recipient, source_class, trace_flags, /* sendopts, queue_id) /* const char *sender; /* const char *recipient; /* int source_class; /* int trace_flags; /* int sendopts; /* VSTRING *queue_id; /* /* VSTREAM *post_mail_fopen_nowait(sender, recipient, source_class, /* trace_flags, sendopts, queue_id) /* const char *sender; /* const char *recipient; /* int source_class; /* int trace_flags; /* int sendopts; /* VSTRING *queue_id; /* /* void post_mail_fopen_async(sender, recipient, source_class, /* trace_flags, sendopts, /* queue_id, notify, context) /* const char *sender; /* const char *recipient; /* int source_class; /* int trace_flags; /* int sendopts; /* VSTRING *queue_id; /* void (*notify)(VSTREAM *stream, void *context); /* void *context; /* /* int post_mail_fprintf(stream, format, ...) /* VSTREAM *stream; /* const char *format; /* /* int post_mail_fputs(stream, str) /* VSTREAM *stream; /* const char *str; /* /* int post_mail_buffer(stream, buf, len) /* VSTREAM *stream; /* const char *buffer; /* /* int POST_MAIL_BUFFER(stream, buf) /* VSTREAM *stream; /* VSTRING *buffer; /* /* int post_mail_fclose(stream) /* VSTREAM *STREAM; /* /* void post_mail_fclose_async(stream, notify, context) /* VSTREAM *stream; /* void (*notify)(int status, void *context); /* void *context; /* DESCRIPTION /* This module provides a convenient interface for the most /* common case of sending one message to one recipient. It /* allows the application to concentrate on message content, /* without having to worry about queue file structure details. /* /* post_mail_fopen() opens a connection to the cleanup service /* and waits until the service is available, does some option /* negotiation, generates message envelope records, and generates /* Received: and Date: message headers. The result is a stream /* handle that can be used for sending message records. /* /* post_mail_fopen_nowait() tries to contact the cleanup service /* only once, and does not wait until the cleanup service is /* available. Otherwise it is identical to post_mail_fopen(). /* /* post_mail_fopen_async() contacts the cleanup service and /* invokes the caller-specified notify routine, with the /* open stream and the caller-specified context when the /* service responds, or with a null stream and the caller-specified /* context when the request could not be completed. It is the /* responsibility of the application to close an open stream. /* /* post_mail_fprintf() formats message content (header or body) /* and sends it to the cleanup service. /* /* post_mail_fputs() sends pre-formatted content (header or body) /* to the cleanup service. /* /* post_mail_buffer() sends a pre-formatted buffer to the /* cleanup service. /* /* POST_MAIL_BUFFER() is a wrapper for post_mail_buffer() that /* evaluates its buffer argument more than once. /* /* post_mail_fclose() completes the posting of a message. /* /* post_mail_fclose_async() completes the posting of a message /* and upon completion invokes the caller-specified notify /* routine, with the cleanup status and caller-specified context /* as arguments. /* /* Arguments: /* .IP sender /* The sender envelope address. It is up to the application /* to produce From: headers. /* .IP recipient /* The recipient envelope address. It is up to the application /* to produce To: headers. /* .IP source_class /* The message source class, as defined in \fB<mail_proto.h>\fR. /* Depending on the setting of the internal_mail_source_classes /* and smtputf8_autodetect_classes parameters, the message /* will or won't be subject to content inspection or SMTPUTF8 /* autodetection. /* .IP trace_flags /* Message tracing flags as specified in \fB<deliver_request.h>\fR. /* .IP sendopts /* Flags defined in <sendopts.h>. This ignores SMTPUTF8 flags for /* UTF8 detected in message headers or envelope email addresses, /* and the flag for detected "TLS-Required: no". /* .IP queue_id /* Null pointer, or pointer to buffer that receives the queue /* ID of the new message. /* .IP stream /* A stream opened by mail_post_fopen(). /* .IP notify /* Application call-back routine. /* .IP context /* Application call-back context. /* DIAGNOSTICS /* post_mail_fopen_nowait() returns a null pointer when the /* cleanup service is not available immediately. /* /* post_mail_fopen_async() returns a null pointer when the /* attempt to contact the cleanup service fails immediately. /* /* post_mail_fprintf(), post_mail_fputs() post_mail_fclose(), /* and post_mail_buffer() return the binary OR of the error /* status codes defined in \fI<cleanup_user.h>\fR. /* /* Fatal errors: cleanup initial handshake errors. This means /* the client and server speak incompatible protocols. /* SEE ALSO /* cleanup_user(3h) cleanup options and results /* cleanup_strerror(3) translate results to text /* cleanup(8) cleanup service /* LICENSE /* .ad /* .fi /* The Secure Mailer license must be distributed with this software. /* AUTHOR(S) /* Wietse Venema /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA /* /* Wietse Venema /* Google, Inc. /* 111 8th Avenue /* New York, NY 10011, USA
/*--*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.