Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* sending mail from multiple accounts
@ 2008-02-21 21:26 Cezar Halmagean
  2008-02-22  0:03 ` Bastien
  2008-02-23  9:40 ` William Xu
  0 siblings, 2 replies; 5+ messages in thread
From: Cezar Halmagean @ 2008-02-21 21:26 UTC (permalink / raw)
  To: info-gnus-english


Hello,

  I am using multiple accounts on different servers which all need their
  own authentication. How can I have a different smtp server for each
  email account ?

Best regards,
Cezar

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: sending mail from multiple accounts
  2008-02-21 21:26 sending mail from multiple accounts Cezar Halmagean
@ 2008-02-22  0:03 ` Bastien
  2008-02-23  9:40 ` William Xu
  1 sibling, 0 replies; 5+ messages in thread
From: Bastien @ 2008-02-22  0:03 UTC (permalink / raw)
  To: Cezar Halmagean; +Cc: info-gnus-english

Hi Cesar,

"Cezar Halmagean" <cezar@mixandgo.com> writes:

>   I am using multiple accounts on different servers which all need their
>   own authentication. How can I have a different smtp server for each
>   email account ?

Have a look at Gnus + msmtp:

  http://www.emacswiki.org/cgi-bin/wiki/GnusMSMTP

I'm not using it myself, but the explanations there look quite clear.

HTH,

-- 
Bastien

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: sending mail from multiple accounts
  2008-02-21 21:26 sending mail from multiple accounts Cezar Halmagean
  2008-02-22  0:03 ` Bastien
@ 2008-02-23  9:40 ` William Xu
  2008-02-23 20:59   ` Cezar Halmagean
  1 sibling, 1 reply; 5+ messages in thread
From: William Xu @ 2008-02-23  9:40 UTC (permalink / raw)
  To: info-gnus-english

"Cezar Halmagean" <cezar@mixandgo.com> writes:

>   I am using multiple accounts on different servers which all need their
>   own authentication. How can I have a different smtp server for each
>   email account ?

My way is config gnus-posting-styles to change smtp server settings
dynamically, based on current group name. Apparently, the drawback is
that I should always compose mail in Gnus, where there should be a valid
group name.

-- 
William

http://williamxu.net9.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: sending mail from multiple accounts
  2008-02-23  9:40 ` William Xu
@ 2008-02-23 20:59   ` Cezar Halmagean
  2008-02-24 10:43     ` William Xu
  0 siblings, 1 reply; 5+ messages in thread
From: Cezar Halmagean @ 2008-02-23 20:59 UTC (permalink / raw)
  To: info-gnus-english


Hi William,

  Could you please post an example that does that ?

Regards,
Cezar

William Xu <william.xwl@gmail.com> writes:

> "Cezar Halmagean" <cezar@mixandgo.com> writes:
>
>>   I am using multiple accounts on different servers which all need their
>>   own authentication. How can I have a different smtp server for each
>>   email account ?
>
> My way is config gnus-posting-styles to change smtp server settings
> dynamically, based on current group name. Apparently, the drawback is
> that I should always compose mail in Gnus, where there should be a valid
> group name.
>
> -- 
> William
>
> http://williamxu.net9.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: sending mail from multiple accounts
  2008-02-23 20:59   ` Cezar Halmagean
@ 2008-02-24 10:43     ` William Xu
  0 siblings, 0 replies; 5+ messages in thread
From: William Xu @ 2008-02-24 10:43 UTC (permalink / raw)
  To: info-gnus-english

"Cezar Halmagean" <cezar@mixandgo.com> writes:

> Hi William,
>
>   Could you please post an example that does that ?

Sure. I have two accounts, one is gmail, the other is company
account. Below are configs cut from .gnus, slightly edited.

---------------------------------8<------------------------------------- 
(defun xwl-sendmail-by-gmail ()
  (interactive)
  (setq message-send-mail-function 'smtpmail-send-it)
  (setq smtpmail-smtp-server "smtp.gmail.com"
        smtpmail-smtp-service 587)

  (setq smtpmail-auth-credentials `((,smtpmail-smtp-server
                                     ,smtpmail-smtp-service
                                     "william.xwl@gmail.com"
                                     "passwd")))

  (setq smtpmail-starttls-credentials `((,smtpmail-smtp-server
                                         ,smtpmail-smtp-service
                                         nil
                                         nil)))
  (message "Will sendmail by gmail"))

(defun xwl-sendmail-by-ce ()
  (interactive)
  (setq message-send-mail-function 'smtpmail-send-it)
  (setq smtpmail-smtp-server "hidden"
        smtpmail-smtp-service 25)
  (setq smtpmail-auth-credentials `((,smtpmail-smtp-server
                                     ,smtpmail-smtp-service
                                     "william@hidden"
                                     "passwd")))
  (setq smtpmail-starttls-credentials nil)
  (message "Will sendmail by CE"))

;; company mail groups
(setq xwl-ce-groups
      '("daily-cn" "staff-cn" "staff"))

;; The entire alist will be iterated over!
(setq gnus-posting-styles
      `((".*"
	 (name user-full-name)
	 (address user-mail-address)
         (eval (xwl-sendmail-by-gmail)))
        (,(regexp-opt xwl-ce-groups)    ; CE
	 (address "william@hidden")
         (eval (xwl-sendmail-by-ce)))))
---------------------------------8<------------------------------------- 

-- 
William

http://williamxu.net9.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-02-24 10:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-21 21:26 sending mail from multiple accounts Cezar Halmagean
2008-02-22  0:03 ` Bastien
2008-02-23  9:40 ` William Xu
2008-02-23 20:59   ` Cezar Halmagean
2008-02-24 10:43     ` William Xu

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).