artdaq_mfextensions  v1_03_05
curl_send_message.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Classes

struct  upload_status
 Structure to track progress of upload in cURL send function. More...
 

Functions

void send_message (const char *dest, const char *to[], size_t to_size, const char *from, const char *payload, size_t payload_size)
 Sends a message to the given SMTP server. More...
 
void send_message_ssl (const char *dest, const char *to[], size_t to_size, const char *from, const char *payload, size_t payload_size, const char *username, const char *pw, int disableVerify)
 Sends a message to the given SMTP server, using SSL encryption. More...
 

Detailed Description

This file wraps the C-language cURL SMTP functions Code is from https://curl.haxx.se/libcurl/c/example.html

Definition in file curl_send_message.h.

Function Documentation

void send_message ( const char *  dest,
const char *  to[],
size_t  to_size,
const char *  from,
const char *  payload,
size_t  payload_size 
)

Sends a message to the given SMTP server.

Parameters
destURL of SMTP server, in form smtp://[HOST]:[PORT]
toArray of strings containing destination addresses
to_sizeSize of the to array (must be >0!)
fromAddress that the email is originating from
payloadMessage payload, including RFC5322 headers
payload_sizeSize of the message payload, in bytes

Definition at line 23 of file curl_send_message.c.

void send_message_ssl ( const char *  dest,
const char *  to[],
size_t  to_size,
const char *  from,
const char *  payload,
size_t  payload_size,
const char *  username,
const char *  pw,
int  disableVerify 
)

Sends a message to the given SMTP server, using SSL encryption.

Parameters
destURL of SMTP server, in form smtps://[HOST]:[PORT]
toArray of strings containing destination addresses
to_sizeSize of the to array (must be >0!)
fromAddress that the email is originating from
payloadMessage payload, including RFC5322 headers
payload_sizeSize of the message payload, in bytes
usernameCredentials for logging in to SMTPS server
pwCredentials for logging in to SMTPS server (Recommend empty string)
disableVerifyDisable verification of host certificate (Recommend 0)

Definition at line 65 of file curl_send_message.c.