[Top][All Lists]

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

Re: Automatically selecting an SMTP server.

From: Jesper Harder
Subject: Re: Automatically selecting an SMTP server.
Date: Tue, 29 Jun 2004 17:39:18 -0000
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

Oliver Jennrich <address@hidden> 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) "]")

You need a different command if you're not using PPP and GNU/Linux, of

Jesper Harder                                <>

reply via email to

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