/*
 *  send_header.c
 *
 *    Use mtaSend() to send a message with an initial header.
 *
 *  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[3];
     int index = 0;

     ITEM(MTA_HDR_ADRS, 0);
     ITEM(MTA_HDRMSG_FILE, "send_header.txt");
     ITEM(MTA_END_LIST, 0);
     return(mtaSend(item_list));
}
