Yuri D'Elia <wav...@users.sf.net> writes: Hi Yuri,
> Could I use 'gnus-parameters' for that, and change > 'message-send-mail-function' depending on the group? I guess, that would be one way, at least as long as you start writing your mail inside some summary buffer and thus gnus parameters apply. Maybe you can come up with something more lightweight. For example, I choose the smtp server based on the network I'm connected to. From externally, my university's smtp doesn't allow sending mail with a different From than that of a university accounts, and inside the university, the smtp port is locked (not sure if that's still true, but anyway). Deciding if I'm connected to the university's network is easy, because there I get an IP starting with 141.26, so here's my code. --8<---------------cut here---------------start------------->8--- (defun th-uni-network-p () "Return non-nil, if the computer is connected to the uni network." (catch 'in-uni-network (dolist (net (network-interface-list)) (let* ((iface (car net)) (addr (car (network-interface-info iface)))) (when (and (= 141 (elt addr 0)) (= 26 (elt addr 1))) (throw 'in-uni-network t)))))) (setq send-mail-function 'smtpmail-send-it message-send-mail-function 'message-smtpmail-send-it smtpmail-debug-info t smtpmail-smtp-server (if (th-uni-network-p) "deliver.uni-koblenz.de" "mail.messagingengine.com")) --8<---------------cut here---------------end--------------->8--- So I use the uni smtp inside the university, and in all other cases I use the smtp of my fastmail account. WRT to Richards suggestion on using msmtp, you probably can do the same without external dependency by setting `smtpmail-smtp-server' appropriately in `message-send-hook'. HTH, Tassilo _______________________________________________ info-gnus-english mailing list info-gnus-english@gnu.org http://lists.gnu.org/mailman/listinfo/info-gnus-english