info-gnus-english
[Top][All Lists]
Advanced

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

changing smtp server?


From: someusernamehere
Subject: changing smtp server?
Date: Fri, 10 Aug 2007 17:31:26 -0000
User-agent: G2/1.0

Hey I have this on my .gnus file:
;; function that change between smtp servers

(defun fs-change-smtp ()
  "Change the SMTP server according to the current from line."
  (save-excursion
    (let ((from
           (save-restriction
             (message-narrow-to-headers)
             (message-fetch-field "from"))))
      (message "From is `%s', setting `smtpmail-smtp-server' to `%s'"
               from
               (cond
                ((string-match "foo@bar.org" from)
                  ;; Use stmp-auth
                  (message "Using smtp-auth")
                   ;; Sending mail
                   ((....................
                      ....................))
                   ((string-match "foo2@bar2.org" from)
                  ;; Use other server
                  (message "Using other server")
                 ((.......................
                   .......................))
                (t
                  (error
                     (concat "Don't know which mail server to use for
"
                               from))))))))

(add-hook 'message-setup-hook 'fs-change-smtp)




For change among smtp servers depending the "from" header, but.....
what abou when I want to send News????, I want to send news with the
from fuck-spam@foo.com, but this is not defined in the function fs-
change-smtp then I get an "Don't know which mail server to use for ",

how I can fix this?


thanks



reply via email to

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