#if !defined (__GNUC__) || __GNUC__ < 2
# define __attribute__(x)
#endif
-#define unused __attribute__((unused))
int
/* Callback to prnt the recipient status */
void
print_recipient_status (smtp_recipient_t recipient,
- const char *mailbox, void *arg unused)
+ const char *mailbox, void *arg)
{
const smtp_status_t *status;
}
-void sendMail(const char *messageContents)
+void sendMail(const char *messageContents, const char *emailAddress)
{
smtp_session_t session;
smtp_message_t message;
char *host = "localhost:25";
char *from = "gnunet-monkey";
char *subject = "e-mail from Libesmtp!";
- const char *recipient_address = "safey.allah@gmail.com";
+ const char *recipient_address = emailAddress;
char tempFileName[1000];
int tempFd;
FILE *fp;
sprintf(tempFileName, "/tmp/messageXXXXXX");
tempFd = mkstemp(tempFileName);
fp = fdopen(tempFd, "w");
- fprintf(fp, messageContents);
+ fprintf(fp, "%s", messageContents);
fclose(fp);
fp = fopen(tempFileName, "r");
smtp_set_message_fp(message, fp);