SMTPFAIL ("smtp_add_message");
/* Initialize envelope sender */
- if (SmtpEnvFrom && *SmtpEnvFrom)
- envfrom = SmtpEnvFrom;
+ if (option (OPTENVFROM) && EnvFrom)
+ envfrom = EnvFrom->mailbox;
if (!smtp_set_reverse_path (message, envfrom))
SMTPFAIL ("smtp_set_reverse_path");
if (fp != NULL)
fclose (fp);
if (hostportstr != NULL)
- free (hostportstr);
+ mem_free (&hostportstr);
if (session != NULL)
smtp_destroy_session (session);
if (authctx != NULL)