🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.vm.bug
Article #518

Re: From header not being added by smtpmail nor esmtpmail

#518
From: newsspam5REMOVETHIS
Date: Sun, 03 Dec 2006 15:14
38 lines
2461 bytes
"AlexJB" <alexjb@gmail.com> writes:

> i'm working on getting VM set up with smtpmail (or esmtpmail) to send
> outgoing messages via SMTP.
>
> inside of the function: smtpmail-send-it, there's code to fill in the
>>From header (about line 282).
>
>
> ;; Put the "From:" field in unless for some odd reason
> ;; they put one in themselves.
> (goto-char (point-min))
> (if (not (re-search-forward "^From:" delimline t))
> (let* ((login smtpmail-mail-address)
>        (fullname (user-full-name)))
>   (cond ((eq mail-from-style 'angles)
>
> -----------------
>
> inside of the cond are three clauses to put in an appropriate From
> header based on the mail-from-style.
>
> on my version of emacs (GNU Emacs 21.4.1 (i386-pc-linux-gnu, X toolkit,
> Xaw3d scroll bars) of 2005-03-17 on trouble, modified by Debian), i
> think that the let* is causing the cond code to not execute, or perhaps
> the insert function is not executing, because no from header is being
> written to the message buffer.

It is written to a temp buffer, so you will never see it in the
message buffer, but it should be in the message on the receiver
side.  Use edebug to single step and you will see that the code
is executed.

If you want a particular set of default headers then set

(setq mail-default-headers "From: Firstname Lastname  <your@email.address>\nOrganization: xy\n")

Robert
Technical Details
Message-ID: <85d571xb8a.fsf@robf.de>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.r-kom.de!news.m-online.net!not-for-mail
References: <1165019219.674454.242500@j72g2000cwa.googlegroups.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: f6829,9c011f1112f91862
X-Google-Attributes: gidf6829,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.r-kom.de!news.m-online.net!not-for-mail
From: newsspam5REMOVETHIS@robf.de
Newsgroups: gnu.emacs.vm.bug
Subject: Re: From header not being added by smtpmail nor esmtpmail
Date: Sun, 03 Dec 2006 16:14:45 +0100
Organization: (posted via) M-net Telekommunikations GmbH
Lines: 38
Message-ID: <85d571xb8a.fsf@robf.de>
References: <1165019219.674454.242500@j72g2000cwa.googlegroups.com>
NNTP-Posting-Host: ppp-82-135-94-124.dynamic.mnet-online.de
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: svr7.m-online.net 1165158886 2326 82.135.94.124 (3 Dec 2006 15:14:46 GMT)
X-Complaints-To: abuse@m-online.net
NNTP-Posting-Date: Sun, 3 Dec 2006 15:14:46 +0000 (UTC)
User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.19 (linux)
Cancel-Lock: sha1:7z2X4tNl6vAQXQytDcfurvCDBnA=