I would like to know how to add a string to array of char*
#define FROM "<[email protected]>"
#define TO "<[email protected]>"
#define CC "<[email protected]>"
#define SUBJECT "TESTING SUBJECT"
string testing("USING variables");
const char * c = "Subject: ";
static const char *payload_text[]={
"To: " TO "\n","From: " FROM "\n","Cc: " CC "\n",c "\n",
"\n", /* empty line to divide headers from body, see RFC5322 */
SUBJECT "\n",
"\n",
"Testing the msg.\n",
"Check RFC5322.\n",
NULL
};
I would like to add either c or the variable testing to the array of payload_test[]
or is there other way to create the array paylod_text[] with user insiated variables.