Unnamed repository; edit this file 'description' to name the repository.
 help / color / Atom feed
* In sending mail, i wish to choose one address(From:) in multiple accounts
@ 2019-11-21  3:31 황병희
  2019-11-21  7:53 ` Alberto Luaces
  2019-11-21  9:36 ` Štěpán Němec
  0 siblings, 2 replies; 5+ messages in thread
From: 황병희 @ 2019-11-21  3:31 UTC (permalink / raw)
  To: info-gnus-english

before, i send question via news but it may be gone Gmane's spam folder
so again i re-send mail. Well i have 3 accounts. At first when i send
mail, i wish to choose one address. There is good reference i think but
i did fail to search, please help me...

Sincerely,

-- 
^고맙습니다 _地平天成_ 감사합니다_^))//

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: In sending mail, i wish to choose one address(From:) in multiple accounts
  2019-11-21  3:31 In sending mail, i wish to choose one address(From:) in multiple accounts 황병희
@ 2019-11-21  7:53 ` Alberto Luaces
  2019-11-21  9:36 ` Štěpán Němec
  1 sibling, 0 replies; 5+ messages in thread
From: Alberto Luaces @ 2019-11-21  7:53 UTC (permalink / raw)
  To: info-gnus-english

황병희 writes:

> before, i send question via news but it may be gone Gmane's spam folder
> so again i re-send mail. Well i have 3 accounts. At first when i send
> mail, i wish to choose one address. There is good reference i think but
> i did fail to search, please help me...

If you want to change From: address → gnus posting styles.

If you want to change your SMTP server → message-mode X-SMTP-Server
header (can be set with posting styles, too).

-- 
Alberto


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: In sending mail, i wish to choose one address(From:) in multiple accounts
  2019-11-21  3:31 In sending mail, i wish to choose one address(From:) in multiple accounts 황병희
  2019-11-21  7:53 ` Alberto Luaces
@ 2019-11-21  9:36 ` Štěpán Němec
  2019-11-21 10:32   ` Alberto Luaces
  2019-11-21 12:12   ` 황병희
  1 sibling, 2 replies; 5+ messages in thread
From: Štěpán Němec @ 2019-11-21  9:36 UTC (permalink / raw)
  To: info-gnus-english; +Cc: 황병희

On Thu, 21 Nov 2019 12:31:59 +0900
황병희 wrote:

> before, i send question via news but it may be gone Gmane's spam folder
> so again i re-send mail. Well i have 3 accounts. At first when i send
> mail, i wish to choose one address. There is good reference i think but
> i did fail to search, please help me...

The `gnus-posting-styles' solution proposed by Alberto is useful if
there are circumstances (often based on the article you're replying to)
that allow choosing the address and other things programmatically
(non-interactively). If all you want is pick an address manually when
composing a new message, you can do something like the following:

(defun my-compose-mail-advice (orig &rest args)
  "Read `user-mail-address' from minibuffer."
  (interactive (lambda (spec)
                 (let* ((user-mail-address
                         (completing-read "From: " '("first@address.com"
                                                     "second@address.com")))
                        (from (message-make-from user-full-name
                                                 user-mail-address))
                        (spec (advice-eval-interactive-spec spec)))
                   (push (cons 'From from) (nth 2 spec))
                   spec)))
  (apply orig args))

(advice-add 'compose-mail :around #'my-compose-mail-advice)

-- 
Štěpán

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: In sending mail, i wish to choose one address(From:) in multiple accounts
  2019-11-21  9:36 ` Štěpán Němec
@ 2019-11-21 10:32   ` Alberto Luaces
  2019-11-21 12:12   ` 황병희
  1 sibling, 0 replies; 5+ messages in thread
From: Alberto Luaces @ 2019-11-21 10:32 UTC (permalink / raw)
  To: info-gnus-english

Štěpán Němec writes:

>                          (completing-read "From: " '("first@address.com"
>                                                      "second@address.com")))

I liked this very much, Štěpán!  Specially the fact that you can either
choose from the list or even input a new item.

-- 
Alberto


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: In sending mail, i wish to choose one address(From:) in multiple accounts
  2019-11-21  9:36 ` Štěpán Němec
  2019-11-21 10:32   ` Alberto Luaces
@ 2019-11-21 12:12   ` 황병희
  1 sibling, 0 replies; 5+ messages in thread
From: 황병희 @ 2019-11-21 12:12 UTC (permalink / raw)
  To: info-gnus-english

> [...] If all you want is pick an address manually when
> composing a new message, you can do something like the following:
>
> (defun my-compose-mail-advice (orig &rest args)
>   "Read `user-mail-address' from minibuffer."
>   (interactive (lambda (spec)
>                  (let* ((user-mail-address
>                          (completing-read "From: " '("first@address.com"
>                                                      "second@address.com")))
>                         (from (message-make-from user-full-name
>                                                  user-mail-address))
>                         (spec (advice-eval-interactive-spec spec)))
>                    (push (cons 'From from) (nth 2 spec))
>                    spec)))
>   (apply orig args))
>
> (advice-add 'compose-mail :around #'my-compose-mail-advice)

What a wonderful world!!! Thank You Very Much, Štěpán^^^

Sincerely,

-- 
^고맙습니다 _地平天成_ 감사합니다_^))//

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-21  3:31 In sending mail, i wish to choose one address(From:) in multiple accounts 황병희
2019-11-21  7:53 ` Alberto Luaces
2019-11-21  9:36 ` Štěpán Němec
2019-11-21 10:32   ` Alberto Luaces
2019-11-21 12:12   ` 황병희

Unnamed repository; edit this file 'description' to name the repository.

Archives are clonable: git clone --mirror http://inbox.vuxu.org/info-gnus-english

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.emacs.gnus.user


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git