#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/timeb.h>
#include <string.h>
#ifdef __linux__
#include <unistd.h>
#else
#include <Windows.h>
#endif
{
}
int main(int argc, char *argv[])
{
char smtp_server_address[50];
char email_account_username[50];
char email_account_password[50];
char email_address[50];
char email_name[50];
char ca_path_and_filename[100];
char to_email_address[50];
char to_email_name[50];
char group_name[50];
char email_subject[50];
char email_message[50];
strcpy(smtp_server_address, "smtp.gmail.com");
strcpy(email_account_username, "mrsock@gmail.com");
strcpy(email_account_password, "liveandprosper");
strcpy(email_address, "mrsock@gmail.com");
strcpy(email_name, "Mr Sock");
strcpy(ca_path_and_filename,"curl-ca-bundle.crt");
email_address, email_name, verify_cert_authorities, generate_curl_debug_messages) ==
SUCCESS)
{
{
strcpy(to_email_address, "captkirt@nasa.gov");
strcpy(to_email_name, "Captain Kirt");
strcpy(group_name, "dogs rule");
{
strcpy(to_email_address, "drmccroy@nasa.gov");
strcpy(to_email_name, "Dr McCroy");
{
strcpy(email_subject, "Dogs and Cats");
strcpy(email_message, "Dogs are smarter than cats.");
{
printf("Error Failed to SendEmail.\n");
return 0;
}
}
else
{
printf("Error Failed to AddToEmailAddress.\n");
return 0;
}
}
else
{
printf("Error Failed to AddToEmailAddress.\n");
return 0;
}
}
else
{
printf("Error Failed to SetCertAuthoritesPathAndFilename.\n");
return 0;
}
}
else
{
printf("Error Failed to InitializeToolkitEmail.\n");
return 0;
}
#ifdef __linux__
sleep(10);
#else
Sleep(10000);
#endif
char config_pathname[256];
char home_path[256];
{
}
sprintf(config_pathname, "%s/email_config.txt", home_path);
{
printf("Error Failed to InitToolkitEmail.\n");
}
strcpy(email_subject, "Dogs and Cats");
strcpy(email_message, "Dogs are smarter than cats.");
{
printf("Error Failed to SendEmail.\n");
return 0;
}
#ifdef __linux__
sleep(10);
#else
Sleep(10000);
#endif
return 0;
}
Message codes and structure definition for the Device Service library.
boolean_type
Boolean enumeration.
Definition: ds_shared.h:104
@ TRUE_OR_YES
True.
Definition: ds_shared.h:106
Structure of parameters needed for message support.
Definition: trek_toolkit_common_api_ansi_c.h:74
char message[MAX_MESSAGE_SIZE]
Message.
Definition: trek_toolkit_common_api_ansi_c.h:77
enum message_category category
Message category (e.g., MSG_CAT_ERROR, MSG_CAT_ERROR_ALERT, MSG_CAT_WARNING, MSG_CAT_WARNING_ALERT,...
Definition: trek_toolkit_common_api_ansi_c.h:76
#define SUCCESS
The function completed successfully.
Definition: trek_error.h:8
#define FAIL
The function failed for an unknown reason.
Definition: trek_error.h:9