/*
 *  send_simple.c
 *
 *    Send a file using mtaSend().
 *
 *  Copyright (c) 2003, Sun Microsystems, Inc.  All Rights Reserved.
 */

#include <string.h>
#include "mtasdk.h"

/* Push an entry onto the item list */
#define ITEM(item,adr) item_list[index].item_code    = item;   \
                       item_list[index].item_address = adr;    \
                       item_list[index].item_length  = adr ? strlen(adr) : 0; \
                       item_list[index].item_status  = 0;      \
                       item_list[index++].item_smessage = NULL

int main()
{
     mta_item_list_t item_list[4];
     int index = 0;

     ITEM(MTA_TO, "root");
     ITEM(MTA_SUBJECT, "send_simple.c");
     ITEM(MTA_MSG_FILE, __FILE__);
     ITEM(MTA_END_LIST, 0);
     return(mtaSend(item_list));
}
