bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-mailutils] Setting 'From:' when composing


From: Maurí­cio CA
Subject: [bug-mailutils] Setting 'From:' when composing
Date: Sun, 02 Aug 2009 23:21:11 -0300
User-agent: Thunderbird 2.0.0.22 (X11/20090608)

(code quotes from git repository as of 2009/08/02)

I see in 'mail' that messages are sent with 'from' parameter as NULL:

mail/send.c, line 614:

    mu_mailer_send_message (mailer, msg, NULL, NULL);


A value for 'from' is then going to be obtained by function
'_set_from' at 'mailbox/mailer.c'. The first attempt this function
does is to get a value from message header:

mailbox/mailer.c, line 353:
    status = mu_header_aget_value (header, MU_HEADER_FROM, &mail_from);


If I read properly, the code for header_aget-like functions checks
key/value pairs in the form "Key: Value" from a given header, in
this case, key="From" (=MU_HEADER_FROM).

After that attempt, '_set_from' returns if mailer is of type
"SENDMAIL", which is not the case, as I'm using (e)smtp, and then
resorts to function 'mu_get_user_email'. That one checks a compile
time email ('mu_user_email' in mailbox/mutil.c) and then user and
host system names.

The stub provided by 'mailutils/libproto/mailer/smtp.c' for
smtp mail sending doesn't seem to further modify that value.

So, I understand (am I right?) that the only way to set a return
e-mail is to fill that 'From' key in message header. How can I do
that? I tried using '~h' in message body, but only To, Cc, Bcc and
Subject fields are available there.


Thanks for your kind attention,
Maurício





reply via email to

[Prev in Thread] Current Thread [Next in Thread]