aboutsummaryrefslogtreecommitdiff
path: root/src/mail.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mail.c')
-rw-r--r--src/mail.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mail.c b/src/mail.c
index beb88d4..a40e4b4 100644
--- a/src/mail.c
+++ b/src/mail.c
@@ -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;

Return to:

Send suggestions and report system problems to the System administrator.