[Top][All Lists]

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

Re: How to send a mail using smtp? - solved! (but need help with "Mail F

From: Duane Winner
Subject: Re: How to send a mail using smtp? - solved! (but need help with "Mail From:")
Date: Tue, 21 Dec 2004 18:51:42 GMT
User-agent: Mozilla Thunderbird 1.0 (X11/20041210)

Duane Winner wrote:
Bob Babcock wrote:

Duane Winner <address@hidden> wrote in

I have been trying to get smtpmail to work with authentication, and
have been having the same problem.

I was told that a newer version of smtpmail.el was necessary to get this to work. I think the version that worked came from

I grabbed this and put it in /usr/local/share/emacs/21.3/lisp/mail/smtpmail.el (replacing current version).

Still have the problem, though.

OK -- good news: I got authentication working with smtpmail.el -- I didn't realize that I needed to byte-compile smtpmail.el. I am now connecting to my ISP's smtp server and successfully authenticating and sending.

But now I am having a problem with the "From:" format. All of my outbound emails are addressed as "From: address@hidden" instead of being rewritten the proper address@hidden (address@hidden)

First, how I got authentication working:

1. Download the latest smtpmail.el from:
to a temporary directory to which you have read/write privs.

2. In emacs, type:
M-x byte-compile-file <RETURN>
Enter <path-to>/smtpmail.el

3. Now have an smtpmail.el and smtpmail.elc. Copy them to /usr/local/share/emacs/21.3/lisp/mail
(This is my path on FreeBSD 5.2.1 -- change to your correct path).

4. My obfuscated .emacs:
;; Please add these lines in your .emacs(_emacs) or use customize.
(setq send-mail-function 'smtpmail-send-it) ; if you use `mail'
(setq message-send-mail-function 'smtpmail-send-it)
(setq smtpmail-default-smtp-server "localhost")
(setq smtpmail-smtp-service 465)
(setq smtpmail-local-domain "")
(setq smtpmail-sendto-domain "")
(setq smtpmail-debug-info t)
(setq smtpmail-debug-verb t)
(setq smtpmail-auth-credentials
      '(("localhost" 465 "myaccountname" "mypassword")))
;;(setq smtpmail-starttls-credentials
;;      '(("YOUR SMTP HOST" 25 "~/.my_smtp_tls.key" "~/.my_smtp_tls.cert")))
;; Where the 25 equals the value of `smtpmail-smtp-service', it can be an
;; integer or a string, just as long as they match (eq).

Note I am going to localhost on port 465 -- this is because my ISP uses SSL. I am using an stunnel connection from my localhost:465 to myisp:465. Next step: see if smtpmail-startttls-credentials works so I don't have to use stunnel.

5. My debug output:

MAIL FROM:<address@hidden> SIZE=212^M
250 ok^M
RCPT TO:<address@hidden>^M
250 ok^M
354 ok^M
Date: 21 Dec 2004 13:44:29 -0500^M
Message-ID: <86d5x3ze2a. address@hidden>^M
From: Duane Winner <address@hidden>^M
To: address@hidden
Subject: test #328^M
more test stuff^M
from me^M
250 ok ; id=2004122118443011100j8luue^M

6. So now my only problem is controlling the "MAIL FROM:" and "From:" fields so that they return "address@hidden" instead of "address@hidden".

Any ideas?

Thanks again,

reply via email to

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