Mailers

#include <mailutils/mailer.h>

int mu_mailer_close(mu_mailer_t mailer);
int mu_mailer_create(mu_mailer_t *mailer, const char *url);
int mu_mailer_create_from_url(mu_mailer_t *mailer, mu_url_t *url);
void mu_mailer_destroy(mu_mailer_t *mailer);
int mu_mailer_open(mu_mailer_t mailer,int flags);
int mu_mailer_send_fragments(mu_mailer_t *mailer, mu_message_t msg, size_t fragsize, struct timeval *delay, mu_address_t from, mu_address_t to);
int mu_mailer_send_message(mu_mailer_t *mailer, mu_message_t msg, mu_address_t from, mu_address_t to);

mu_mailer_t

typedef _mu_mailer_t *mu_mailer_t

This is an opaque data structure. The fields should not be accessed by a user program.

mu_mailer_close

int mu_mailer_close(mu_mailer_t mailer);

Closes the mailer. Returns 0 if successful or an error code.

mu_mailer_create

int mu_mailer_create(mu_mailer_t *mailer, const char *url);

Creates a mailer based on the url passed in url. If the url argument is NULL then it is taken from the configuration file. The function returns 0 if successful or an error code.

mu_mailer_create_from_url

int mu_mailer_create_from_url(mu_mailer_t *mailer, mu_url_t *url);

Creates a mailer based on the url passed in url. The function returns 0 if successful or an error code.

mu_mailer_destroy

void mu_mailer_destroy(mu_mailer_t *mailer);

Releases the resources allocated to the mailer.

mu_mailer_open

int mu_mailer_open(mu_mailer_t mailer,int flags);

Opens the mailer. flags can be MAILER_FLAG_DEBUG_DATA or any of the MU_STREAM_x flags. The function returns 0 if successful or an error code.

mu_mailer_send_fragments

int mu_mailer_send_fragments(mu_mailer_t *mailer, mu_message_t msg, size_t fragsize, struct timeval *delay, mu_address_t from, mu_address_t to);

mu_mailer_send_message

int mu_mailer_send_message(mu_mailer_t *mailer, mu_message_t msg, mu_address_t from, mu_address_t to);

Sends the message to the recipients. The function returns 0 if successful or an error code.

 
mailers.txt · Last modified: 2009/07/03 11:53 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki