push username, homedir and tmpdir in lua too.
[apps/madmutt.git] / send.c
diff --git a/send.c b/send.c
index 2143f19..6ca6963 100644 (file)
--- a/send.c
+++ b/send.c
@@ -968,11 +968,11 @@ address_t *mutt_default_from (void)
   else if (option (OPTUSEDOMAIN)) {
     const char *fqdn = mutt_fqdn (1);
     adr = address_new();
-    adr->mailbox = p_new(char, m_strlen(Username) + m_strlen(fqdn) + 2);
-    sprintf(adr->mailbox, "%s@%s", NONULL(Username), NONULL(fqdn));
+    adr->mailbox = p_new(char, m_strlen(MCore.username) + m_strlen(fqdn) + 2);
+    sprintf(adr->mailbox, "%s@%s", NONULL(MCore.username), NONULL(fqdn));
   } else {
     adr = address_new ();
-    adr->mailbox = m_strdup(NONULL(Username));
+    adr->mailbox = m_strdup(NONULL(MCore.username));
   }
 
   return (adr);
@@ -985,7 +985,7 @@ static int send_message (HEADER * msg)
   int i;
 
   /* Write out the message in MIME form. */
-  tempfp = m_tempfile(tempfile, sizeof(tempfile), NONULL(Tempdir), NULL);
+  tempfp = m_tempfile(tempfile, sizeof(tempfile), NONULL(MCore.tmpdir), NULL);
   if (!tempfp)
     return -1;
 
@@ -1183,7 +1183,7 @@ int ci_send_message (int flags, /* send mode */
 
     if (!tempfile) {
       char buffer[_POSIX_PATH_MAX];
-      tempfp = m_tempfile(buffer, sizeof(buffer), NONULL(Tempdir), NULL);
+      tempfp = m_tempfile(buffer, sizeof(buffer), NONULL(MCore.tmpdir), NULL);
       msg->content->filename = m_strdup(buffer);
     } else {
       tempfp = safe_fopen(tempfile, "a+");