From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/3868 Path: news.gmane.org!not-for-mail From: Jesper Harder Newsgroups: gmane.emacs.gnus.user Subject: Re: Automatically selecting an SMTP server. Date: Tue, 08 Jun 2004 15:38:41 +0200 Organization: http://purl.org/harder/ Message-ID: References: <817juinrc9.fsf@ID-371.user.uni-berlin.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138669883 20702 80.91.229.2 (31 Jan 2006 01:11:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 01:11:23 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:32:52 2006 Original-Path: quimby.gnus.org!newsfeed1.e.nsc.no!nsc.no!nextra.com!news.tele.dk!news.tele.dk!small.news.tele.dk!not-for-mail Original-Newsgroups: gnu.emacs.gnus X-Face: ^RrvqCr7c,P$zTR:QED"@h9+BTm-"fjZJJ-3=OU7.)i/K]<.J88}s>'Z_$r; Oliver Jennrich writes: > I was thinking along the lines of abusing message-send-hook, but I > have no idea how to find the current IP-number in lisp. I think there is a way in the development version of Emacs now. That doesn't help you since you'r using XEmacs. But if Lisp doesn't provide it, then you need to figure out some external command to run. I use the following to get the current IP of my box: (defun smtpmail-fqdn () (let ((str (shell-command-to-string "/sbin/ifconfig ppp0"))) (if (string-match "inet addr:\\([^ ]+\\) " str) (concat "[" (match-string-no-properties 1 str) "]") (system-name)))) You need a different command if you're not using PPP and GNU/Linux, of course. -- Jesper Harder