diff options
Diffstat (limited to 'src/mail.c')
-rw-r--r-- | src/mail.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -55,7 +55,8 @@ mail_send_message (mu_address_t rcpt, const char *text) static char *x_mailer = "wydawca (" PACKAGE_STRING ")"; size_t size; char *buf; - + const char *sval; + mu_message_create (&msg, NULL); mu_message_get_stream (msg, &stream); @@ -70,6 +71,15 @@ mail_send_message (mu_address_t rcpt, const char *text) mu_header_set_value (hdr, "To", buf, 1); free (buf); + if (from_address && mu_header_sget_value (hdr, "From", &sval)) + { + mu_address_to_string (from_address, NULL, 0, &size); + buf = xmalloc (size + 1); + mu_address_to_string (from_address, buf, size + 1, NULL); + mu_header_set_value (hdr, "From", buf, 1); + free (buf); + } + if (debug_level > 1) { mu_debug_t debug; |