From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Duane Winner Newsgroups: gmane.emacs.help 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 Organization: AT&T Worldnet Message-ID: <2h_xd.17273$uM5.13591@bgtnsc05-news.ops.worldnet.att.net> References: <32lcr2F2g1p01U1@individual.net> <32lid1F3nq6ivU1@individual.net> <41C74C31.8040305@att.net> <0hXxd.16785$uM5.7110@bgtnsc05-news.ops.worldnet.att.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1103655391 7875 80.91.229.6 (21 Dec 2004 18:56:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 21 Dec 2004 18:56:31 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 21 19:56:25 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CgpBJ-0005jY-00 for ; Tue, 21 Dec 2004 19:56:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CgpLo-0007ke-FD for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Dec 2004 14:07:16 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!7ad0f515!not-for-mail User-Agent: Mozilla Thunderbird 1.0 (X11/20041210) X-Accept-Language: en-us, en Original-Newsgroups: gnu.emacs.help In-Reply-To: <0hXxd.16785$uM5.7110@bgtnsc05-news.ops.worldnet.att.net> Original-Lines: 103 Original-NNTP-Posting-Host: 71daa41eae990a1a1784964e32bf48e9 Original-X-Complaints-To: abuse@worldnet.att.net Original-X-Trace: bgtnsc05-news.ops.worldnet.att.net 1103655102 71daa41eae990a1a1784964e32bf48e9 (Tue, 21 Dec 2004 18:51:42 GMT) Original-NNTP-Posting-Date: Tue, 21 Dec 2004 18:51:42 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:127449 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:22898 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:22898 Duane Winner wrote: > Bob Babcock wrote: > >> Duane Winner wrote in >> news:41C74C31.8040305@att.net: >> >>> 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 >> http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/mail/ > > > 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: me@localhost" instead of being rewritten the proper user@domain (myaccount@myisp.net) First, how I got authentication working: 1. Download the latest smtpmail.el from: http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/mail/ to a temporary directory to which you have read/write privs. 2. In emacs, type: M-x byte-compile-file Enter /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 "att.net") (setq smtpmail-sendto-domain "att.net") (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: SIZE=212^M 250 ok^M RCPT TO:^M 250 ok^M DATA^M 354 ok^M Date: 21 Dec 2004 13:44:29 -0500^M Message-ID: <86d5x3ze2a. fsf@localhost>^M From: Duane Winner ^M To: duanewinner@att.net^M Subject: test #328^M ^M more test stuff^M from me^M .^M 250 ok ; id=2004122118443011100j8luue^M QUIT^M 221 myisp.isp.net^M 6. So now my only problem is controlling the "MAIL FROM:" and "From:" fields so that they return "myispaccountname@myisp.domain.net" instead of "mylocalaccountname@mylocalhost". Any ideas? Thanks again, Duane