Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: someusernamehere <someusernamehere@gmail.com>
To: info-gnus-english@gnu.org
Subject: Re: changing smtp server?
Date: Fri, 10 Aug 2007 18:22:27 -0000	[thread overview]
Message-ID: <1186770147.837979.152700@x35g2000prf.googlegroups.com> (raw)
In-Reply-To: <874pj7xnzx.fsf@topper.koldfront.dk>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 2291 bytes --]

On 10 ago, 13:06, a...@koldfront.dk (Adam Sjøgren) wrote:
> On Fri, 10 Aug 2007 17:59:14 -0000, someusernamehere wrote:
> >> If you must use an email-adress that isn't yours, use the .invalid
> >> top-level domain.
> > What is this??
>
> <http://www.ietf.org/rfc/rfc2606.txt>
>
> >> See (Info-goto-node "(Gnus)Posting Styles") or
> >> <http://gnus.org/manual/gnus_139.html#SEC139> for the details.
> > Which I mean is about the function posted by my, what/how indicate
> > that the invalid from ( invalid-f...@foo.bar or whatever)  must send
> > mail across newsserver
>
> I do not understand your question this time around.
>
> You want to specify a from-address that will be used when you write a
> news-article, right?
>


Nope, I have now configured these in posting styles, which I want is:



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 "f...@bar.org" from)
                  ;; Use stmp-auth
                  (message "Using smtp-auth")
                   ;; Sending mail
                   ((....................
                      ....................))
                   ((string-match "f...@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-s...@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	other threads:[~2007-08-10 18:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-10 17:31 someusernamehere
2007-08-10 17:54 ` Adam Sjøgren
2007-08-10 17:59   ` someusernamehere
2007-08-10 18:06     ` Adam Sjøgren
2007-08-10 18:22       ` someusernamehere [this message]
2007-08-10 19:02         ` Adam Sjøgren
2007-08-10 19:37         ` Tassilo Horn
  -- strict thread matches above, loose matches on Subject: below --
2007-08-10 17:28 someusernamehere

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1186770147.837979.152700@x35g2000prf.googlegroups.com \
    --to=someusernamehere@gmail.com \
    --cc=info-gnus-english@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).