Rocco Rutte:
[apps/madmutt.git] / mutt_libesmtp.c
index 50a6f86..6263662 100644 (file)
@@ -358,8 +358,8 @@ int mutt_libesmtp_invoke (ADDRESS * from,       /* the sender */
     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");
 
@@ -397,7 +397,7 @@ Done:
   if (fp != NULL)
     fclose (fp);
   if (hostportstr != NULL)
-    free (hostportstr);
+    mem_free (&hostportstr);
   if (session != NULL)
     smtp_destroy_session (session);
   if (authctx != NULL)