Skip to content

Commit

Permalink
Implements Reply-To for OS_Sendmail()
Browse files Browse the repository at this point in the history
  • Loading branch information
calve committed Mar 5, 2016
1 parent a40373e commit b9f3000
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/os_maild/sendmail.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,17 @@ int OS_Sendmail(MailConfig *mail, struct tm *p)
OS_SendTCP(socket, snd_msg);
}

/* Send reply-to if set */
if (mail->reply_to){
memset(snd_msg, '\0', 128);
snprintf(snd_msg, 127, REPLYTO, mail->reply_to);
if (sendmail) {
fprintf(sendmail, snd_msg);
} else {
OS_SendTCP(socket, snd_msg);
}
}

/* Add CCs */
if (mail->to[1]) {
i = 1;
Expand Down

0 comments on commit b9f3000

Please sign in to comment.