unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* sending mail with gnus
@ 2025-01-08 13:22 gfp
  2025-01-08 14:03 ` gfp
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: gfp @ 2025-01-08 13:22 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org


[-- Attachment #1.1.1: Type: text/plain, Size: 1261 bytes --]

Hi,

now I tried to send an email with gnus:
------------------------------------------------------------
The debugger said:

  Emacs is about to send an email message, but it has not been
  configured for sending email.  To tell Emacs how to send email:

  - Type ‘mail client’ to start your default email client and
    pass it the message text.

  - Type ‘smtp’ to send mail directly to an "outgoing mail" server.
    (Emacs may prompt you for SMTP settings).

  Emacs will record your selection and will use it thereafter.
  To change it later, customize the option ‘send-mail-function’.


and
Wrong type argument; listp, mailclient-send-it
--------------------------------------------------------------

My gnus.el:

  Reply to mails with matching email address
(setq gnus-posting-styles
       '((address "gottfried <gottfried@posteo.de>")
        ("X-Message-SMTP-Method" "smtp Posteo-posteo.de 465 
gottfried@posteo.de")))


in the gnus manual it says:
;(setq message-send-mail-function 'smtpmail-send-it
;                smtpmail-default-smtp-server "smtp Posteo-posteo.de 465 
gottfried@posteo.de")

but it doesn´t work as well.

I guess there is some code missing.

thanks for help

Gottfried

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2451 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 665 bytes --]

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

* Re: sending mail with gnus
  2025-01-08 13:22 sending mail with gnus gfp
@ 2025-01-08 14:03 ` gfp
  2025-01-08 16:17 ` Leo Butler
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 12+ messages in thread
From: gfp @ 2025-01-08 14:03 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org


[-- Attachment #1.1.1: Type: text/plain, Size: 1793 bytes --]

Hi,
an additional info:

this comes up, when I try to send a mail:

  Date: Wed, 08 Jan 2025 15:00:24 +0100
Message-ID: <87cygxcsnb.fsf@Tuxedo.mail-host-address-is-not-set>

My host is:

gfp@Tuxedo ~$ cat /etc/hosts
127.0.0.1       localhost       Tuxedo
::1     localhost       Tuxedo

how can I put that into my gnus.el?

thanks

Gottfried


Am 08.01.25 um 14:22 schrieb gfp:
> Hi,
> 
> now I tried to send an email with gnus:
> ------------------------------------------------------------
> The debugger said:
> 
>   Emacs is about to send an email message, but it has not been
>   configured for sending email.  To tell Emacs how to send email:
> 
>   - Type ‘mail client’ to start your default email client and
>     pass it the message text.
> 
>   - Type ‘smtp’ to send mail directly to an "outgoing mail" server.
>     (Emacs may prompt you for SMTP settings).
> 
>   Emacs will record your selection and will use it thereafter.
>   To change it later, customize the option ‘send-mail-function’.
> 
> 
> and
> Wrong type argument; listp, mailclient-send-it
> --------------------------------------------------------------
> 
> My gnus.el:
> 
>   Reply to mails with matching email address
> (setq gnus-posting-styles
>        '((address "gottfried <gottfried@posteo.de>")
>         ("X-Message-SMTP-Method" "smtp Posteo-posteo.de 465 
> gottfried@posteo.de")))
> 
> 
> in the gnus manual it says:
> ;(setq message-send-mail-function 'smtpmail-send-it
> ;                smtpmail-default-smtp-server "smtp Posteo-posteo.de 465 
> gottfried@posteo.de")
> 
> but it doesn´t work as well.
> 
> I guess there is some code missing.
> 
> thanks for help
> 
> Gottfried




[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2451 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 665 bytes --]

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

* Re: sending mail with gnus
  2025-01-08 13:22 sending mail with gnus gfp
  2025-01-08 14:03 ` gfp
@ 2025-01-08 16:17 ` Leo Butler
  2025-01-08 20:46 ` Michael Heerdegen via Users list for the GNU Emacs text editor
  2025-01-08 20:53 ` Arash Esbati
  3 siblings, 0 replies; 12+ messages in thread
From: Leo Butler @ 2025-01-08 16:17 UTC (permalink / raw)
  To: gfp; +Cc: help-gnu-emacs@gnu.org

On Wed, Jan 08 2025, gfp <gfp@posteo.at> wrote:

> Hi,
>
> now I tried to send an email with gnus:
> ------------------------------------------------------------
> The debugger said:
>
>  Emacs is about to send an email message, but it has not been
>  configured for sending email.  To tell Emacs how to send email:
>
>  - Type ‘mail client’ to start your default email client and
>    pass it the message text.
>
>  - Type ‘smtp’ to send mail directly to an "outgoing mail" server.
>    (Emacs may prompt you for SMTP settings).
>
>  Emacs will record your selection and will use it thereafter.
>  To change it later, customize the option ‘send-mail-function’.
>
>
> and
> Wrong type argument; listp, mailclient-send-it
> --------------------------------------------------------------
>
> My gnus.el:
>
>  Reply to mails with matching email address
> (setq gnus-posting-styles
>       '((address "gottfried <gottfried@posteo.de>")
>        ("X-Message-SMTP-Method" "smtp Posteo-posteo.de 465
>        gottfried@posteo.de")))

I don't think that this is correct. See the examples in the Gnus manual:

(info "(gnus) Posting Styles")

[You can evaluate that sexp in Gnus/Emacs by placing point at the right
and typing the keychords C-x C-e. It will take you to the appropriate
part of the Gnus manual.]

Leo

>
>
> in the gnus manual it says:
> ;(setq message-send-mail-function 'smtpmail-send-it
> ;                smtpmail-default-smtp-server "smtp Posteo-posteo.de
>                  465 gottfried@posteo.de")
>
> but it doesn´t work as well.
>
> I guess there is some code missing.
>
> thanks for help
>
> Gottfried
>
>

-- 
---
Best regards,
Dr Butler

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

* Re: sending mail with gnus
  2025-01-08 13:22 sending mail with gnus gfp
  2025-01-08 14:03 ` gfp
  2025-01-08 16:17 ` Leo Butler
@ 2025-01-08 20:46 ` Michael Heerdegen via Users list for the GNU Emacs text editor
  2025-01-08 20:53 ` Arash Esbati
  3 siblings, 0 replies; 12+ messages in thread
From: Michael Heerdegen via Users list for the GNU Emacs text editor @ 2025-01-08 20:46 UTC (permalink / raw)
  To: help-gnu-emacs

gfp <gfp@posteo.at> writes:

> in the gnus manual it says:
> ;(setq message-send-mail-function 'smtpmail-send-it
> ;                smtpmail-default-smtp-server "smtp Posteo-posteo.de
>                  465 gottfried@posteo.de")

Really?  How comes that your private mail address appears in the Gnus
manual? ;-)

To be more honest, I think something's wrong there.  Should the
`smtpmail-default-smtp-server' not be bound to a, well, a server name
like "smtp.yourProvider.net"?  Port and user name should be specified
using `smtpmail-smtp-service' and `smtpmail-smtp-user' as far as I
understand.


Michael.




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

* Re: sending mail with gnus
  2025-01-08 13:22 sending mail with gnus gfp
                   ` (2 preceding siblings ...)
  2025-01-08 20:46 ` Michael Heerdegen via Users list for the GNU Emacs text editor
@ 2025-01-08 20:53 ` Arash Esbati
  2025-01-08 22:11   ` gfp
  3 siblings, 1 reply; 12+ messages in thread
From: Arash Esbati @ 2025-01-08 20:53 UTC (permalink / raw)
  To: gfp; +Cc: help-gnu-emacs@gnu.org

gfp <gfp@posteo.at> writes:

> My gnus.el:
>
>  Reply to mails with matching email address
> (setq gnus-posting-styles
>       '((address "gottfried <gottfried@posteo.de>")
>        ("X-Message-SMTP-Method" "smtp Posteo-posteo.de 465
>        gottfried@posteo.de")))
>
>
> in the gnus manual it says:
> ;(setq message-send-mail-function 'smtpmail-send-it
> ;                smtpmail-default-smtp-server "smtp Posteo-posteo.de
>                  465 gottfried@posteo.de")
>
> but it doesn´t work as well.

I don't use posteo, but I think the following snippets should get you
going:

--8<---------------cut here---------------start------------->8---
;; ~/.gnus
(setq gnus-parameters
      '((".*"
         (posting-style
          (name "gfp")
          (address "gottfried@posteo.de")
          ;; ("X-Message-SMTP-Method" "smtp posteo.de 465")
          ))))

(setq message-send-mail-function 'smtpmail-send-it
      smtpmail-smtp-server "posteo.de"
      smtpmail-smtp-service 465)

;; ~/.authinfo
machine posteo.de port 465 login gottfried@posteo.de password PASSWORD
--8<---------------cut here---------------end--------------->8---

Note that I like to use `gnus-parameters' as one-stop shop for setting
all parameters for my groups, incl. the posting style.

Best, Arash



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

* Re: sending mail with gnus
  2025-01-08 20:53 ` Arash Esbati
@ 2025-01-08 22:11   ` gfp
  2025-01-08 22:36     ` Arash Esbati
                       ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: gfp @ 2025-01-08 22:11 UTC (permalink / raw)
  To: Arash Esbati; +Cc: help-gnu-emacs@gnu.org


[-- Attachment #1.1.1: Type: text/plain, Size: 2722 bytes --]

Hi Arash,

thanks for your help.
I appreciate that very much.

1.
How do you do this? to get this line:
--8<---------------cut here---------------start------------->8---

2.
I fiddled around for many hours today to get gnus SMTP working
and to my own great astonishment
I just managed it some seconds before I got your email.

my gnus.el:
;; get emails
(setq gnus-select-method '(nnnil ""))
(setq gnus-secondary-select-methods
       '((nnimap "posteo"
                 (nnimap-address "posteo.de")
                 (nnnimap-user "gottfried@posteo.de")
                 (nnimap-authenticator login)
                 (nnimap-stream ssl)
                 (nnimap-server-port 993))))

;; Reply emails
(setq gnus-posting-styles
       '((smtpmail-smtp-service)
         (smtpmail-smtp-server "smtp.posteo.de")
	(smtpmail-smtp-user "gottfried@posteo.de")
         (smtpmail-smtp-port 465)))


So I don´t need your help at the moment. But I will keep it as record, 
in case I need it.

Interestingly even I changed my /.authinfo file into /.authinfo.gpg
it worked.

I am happy,
but unfortunately it takes many hours
to set up every small step in Emacs and Gnus.

Further questions will arise...


Kind regards

Gottfried



Am 08.01.25 um 21:53 schrieb Arash Esbati:
> gfp <gfp@posteo.at> writes:
> 
>> My gnus.el:
>>
>>   Reply to mails with matching email address
>> (setq gnus-posting-styles
>>        '((address "gottfried <gottfried@posteo.de>")
>>         ("X-Message-SMTP-Method" "smtp Posteo-posteo.de 465
>>         gottfried@posteo.de")))
>>
>>
>> in the gnus manual it says:
>> ;(setq message-send-mail-function 'smtpmail-send-it
>> ;                smtpmail-default-smtp-server "smtp Posteo-posteo.de
>>                   465 gottfried@posteo.de")
>>
>> but it doesn´t work as well.
> 
> I don't use posteo, but I think the following snippets should get you
> going:
> 
> --8<---------------cut here---------------start------------->8---
> ;; ~/.gnus
> (setq gnus-parameters
>        '((".*"
>           (posting-style
>            (name "gfp")
>            (address "gottfried@posteo.de")
>            ;; ("X-Message-SMTP-Method" "smtp posteo.de 465")
>            ))))
> 
> (setq message-send-mail-function 'smtpmail-send-it
>        smtpmail-smtp-server "posteo.de"
>        smtpmail-smtp-service 465)
> 
> ;; ~/.authinfo
> machine posteo.de port 465 login gottfried@posteo.de password PASSWORD
> --8<---------------cut here---------------end--------------->8---
> 
> Note that I like to use `gnus-parameters' as one-stop shop for setting
> all parameters for my groups, incl. the posting style.
> 
> Best, Arash


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2451 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 665 bytes --]

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

* Re: sending mail with gnus
  2025-01-08 22:11   ` gfp
@ 2025-01-08 22:36     ` Arash Esbati
  2025-01-09  3:30     ` Leo Butler
  2025-01-10 11:59     ` gfp
  2 siblings, 0 replies; 12+ messages in thread
From: Arash Esbati @ 2025-01-08 22:36 UTC (permalink / raw)
  To: gfp; +Cc: help-gnu-emacs@gnu.org

gfp <gfp@posteo.at> writes:

> thanks for your help.
> I appreciate that very much.

You're welcome.

> 1.
> How do you do this? to get this line:
> --8<---------------cut here---------------start------------->8---

I mark a region when writing a message and hit 'C-c M-m':

,----[ C-h k C-c M-m ]
| C-c M-m runs the command message-mark-inserted-region (found in
| message-mode-map), which is an interactive native-comp-function in
| ‘message.el’.
| 
| It is bound to C-c M-m.
| 
| (message-mark-inserted-region BEG END &optional VERBATIM)
| 
| Inferred type: (function (t t &optional t) t)
| 
| Mark some region in the current article with enclosing tags.
| See ‘message-mark-insert-begin’ and ‘message-mark-insert-end’.
| If VERBATIM, use slrn style verbatim marks ("#v+" and "#v-").
| 
`----

> 2.
> I fiddled around for many hours today to get gnus SMTP working
> and to my own great astonishment
> I just managed it some seconds before I got your email.
>
> my gnus.el:
> ;; get emails
> (setq gnus-select-method '(nnnil ""))
> (setq gnus-secondary-select-methods
>       '((nnimap "posteo"
>                 (nnimap-address "posteo.de")
>                 (nnnimap-user "gottfried@posteo.de")
>                 (nnimap-authenticator login)
>                 (nnimap-stream ssl)
>                 (nnimap-server-port 993))))
>
> ;; Reply emails
> (setq gnus-posting-styles
>       '((smtpmail-smtp-service)
>         (smtpmail-smtp-server "smtp.posteo.de")
> 	(smtpmail-smtp-user "gottfried@posteo.de")
>         (smtpmail-smtp-port 465)))

And I'm astonished that it works with the code above for
`gnus-posting-styles', compare your code with the description in the
manual[1].  Well, when it works for you, it works.

> So I don´t need your help at the moment. But I will keep it as record,
> in case I need it.
>
> Interestingly even I changed my /.authinfo file into /.authinfo.gpg
> it worked.
>
> I am happy,
> but unfortunately it takes many hours
> to set up every small step in Emacs and Gnus.

I agree, it takes time at the beginning, so I can urge you to read the
manuals carefully and try to solve one issue after the other.

Best, Arash

Footnotes:
[1]  https://www.gnu.org/software/emacs/manual/html_mono/gnus.html#Posting-Styles



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

* Re: sending mail with gnus
  2025-01-08 22:11   ` gfp
  2025-01-08 22:36     ` Arash Esbati
@ 2025-01-09  3:30     ` Leo Butler
  2025-01-09  9:16       ` gfp
  2025-01-10 11:59     ` gfp
  2 siblings, 1 reply; 12+ messages in thread
From: Leo Butler @ 2025-01-09  3:30 UTC (permalink / raw)
  To: gfp; +Cc: Arash Esbati, help-gnu-emacs@gnu.org

On Wed, Jan 08 2025, gfp <gfp@posteo.at> wrote:

> Hi Arash,
>
> thanks for your help.
> I appreciate that very much.
>
> 1.
> How do you do this? to get this line:
> --8<---------------cut here---------------start------------->8---
>
> 2.
> I fiddled around for many hours today to get gnus SMTP working
> and to my own great astonishment
> I just managed it some seconds before I got your email.

How did you send this email? This email that I am replying to does not
have a User-Agent set in the headers. You can check the headers of the
other emails, they all have some variation on:

User-Agent: Gnus/5.13 (Gnus v5.13)

(In Gnus, in the message buffer, type t to show the headers).

Leo

>
> my gnus.el:
> ;; get emails
> (setq gnus-select-method '(nnnil ""))
> (setq gnus-secondary-select-methods
>       '((nnimap "posteo"
>                 (nnimap-address "posteo.de")
>                 (nnnimap-user "gottfried@posteo.de")
>                 (nnimap-authenticator login)
>                 (nnimap-stream ssl)
>                 (nnimap-server-port 993))))
>
> ;; Reply emails
> (setq gnus-posting-styles
>       '((smtpmail-smtp-service)
>         (smtpmail-smtp-server "smtp.posteo.de")
> 	(smtpmail-smtp-user "gottfried@posteo.de")
>         (smtpmail-smtp-port 465)))
>
>
> So I don´t need your help at the moment. But I will keep it as record,
> in case I need it.
>
> Interestingly even I changed my /.authinfo file into /.authinfo.gpg
> it worked.
>
> I am happy,
> but unfortunately it takes many hours
> to set up every small step in Emacs and Gnus.
>
> Further questions will arise...
>
>
> Kind regards
>
> Gottfried
>
>
>
> Am 08.01.25 um 21:53 schrieb Arash Esbati:
>> gfp <gfp@posteo.at> writes:
>> 
>>> My gnus.el:
>>>
>>>   Reply to mails with matching email address
>>> (setq gnus-posting-styles
>>>        '((address "gottfried <gottfried@posteo.de>")
>>>         ("X-Message-SMTP-Method" "smtp Posteo-posteo.de 465
>>>         gottfried@posteo.de")))
>>>
>>>
>>> in the gnus manual it says:
>>> ;(setq message-send-mail-function 'smtpmail-send-it
>>> ;                smtpmail-default-smtp-server "smtp Posteo-posteo.de
>>>                   465 gottfried@posteo.de")
>>>
>>> but it doesn´t work as well.
>> I don't use posteo, but I think the following snippets should get
>> you
>> going:
>> --8<---------------cut here---------------start------------->8---
>> ;; ~/.gnus
>> (setq gnus-parameters
>>        '((".*"
>>           (posting-style
>>            (name "gfp")
>>            (address "gottfried@posteo.de")
>>            ;; ("X-Message-SMTP-Method" "smtp posteo.de 465")
>>            ))))
>> (setq message-send-mail-function 'smtpmail-send-it
>>        smtpmail-smtp-server "posteo.de"
>>        smtpmail-smtp-service 465)
>> ;; ~/.authinfo
>> machine posteo.de port 465 login gottfried@posteo.de password PASSWORD
>> --8<---------------cut here---------------end--------------->8---
>> Note that I like to use `gnus-parameters' as one-stop shop for
>> setting
>> all parameters for my groups, incl. the posting style.
>> Best, Arash
>
>

-- 
---
Best regards,
Dr Butler

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

* Re: sending mail with gnus
  2025-01-09  3:30     ` Leo Butler
@ 2025-01-09  9:16       ` gfp
  0 siblings, 0 replies; 12+ messages in thread
From: gfp @ 2025-01-09  9:16 UTC (permalink / raw)
  To: Leo Butler; +Cc: Arash Esbati, help-gnu-emacs@gnu.org


[-- Attachment #1.1.1: Type: text/plain, Size: 3846 bytes --]

Hi Leo,

> How did you send this email? This email that I am replying to does not
>> have a User-Agent set in the headers. You can check the headers of the
>> other emails, they all have some variation on:
>> 
>> User-Agent: Gnus/5.13 (Gnus v5.13)
>> 
>> (In Gnus, in the message buffer, type t to show the headers).

I am not sure what you mean exactly.

I didn´t send this email with gnus
but with Thunderbird.
May be that solves the question.

Gottfried



Am 09.01.25 um 04:30 schrieb Leo Butler:
> On Wed, Jan 08 2025, gfp <gfp@posteo.at> wrote:
> 
>> Hi Arash,
>>
>> thanks for your help.
>> I appreciate that very much.
>>
>> 1.
>> How do you do this? to get this line:
>> --8<---------------cut here---------------start------------->8---
>>
>> 2.
>> I fiddled around for many hours today to get gnus SMTP working
>> and to my own great astonishment
>> I just managed it some seconds before I got your email.
> 
> How did you send this email? This email that I am replying to does not
> have a User-Agent set in the headers. You can check the headers of the
> other emails, they all have some variation on:
> 
> User-Agent: Gnus/5.13 (Gnus v5.13)
> 
> (In Gnus, in the message buffer, type t to show the headers).
> 
> Leo
> 
>>
>> my gnus.el:
>> ;; get emails
>> (setq gnus-select-method '(nnnil ""))
>> (setq gnus-secondary-select-methods
>>        '((nnimap "posteo"
>>                  (nnimap-address "posteo.de")
>>                  (nnnimap-user "gottfried@posteo.de")
>>                  (nnimap-authenticator login)
>>                  (nnimap-stream ssl)
>>                  (nnimap-server-port 993))))
>>
>> ;; Reply emails
>> (setq gnus-posting-styles
>>        '((smtpmail-smtp-service)
>>          (smtpmail-smtp-server "smtp.posteo.de")
>> 	(smtpmail-smtp-user "gottfried@posteo.de")
>>          (smtpmail-smtp-port 465)))
>>
>>
>> So I don´t need your help at the moment. But I will keep it as record,
>> in case I need it.
>>
>> Interestingly even I changed my /.authinfo file into /.authinfo.gpg
>> it worked.
>>
>> I am happy,
>> but unfortunately it takes many hours
>> to set up every small step in Emacs and Gnus.
>>
>> Further questions will arise...
>>
>>
>> Kind regards
>>
>> Gottfried
>>
>>
>>
>> Am 08.01.25 um 21:53 schrieb Arash Esbati:
>>> gfp <gfp@posteo.at> writes:
>>>
>>>> My gnus.el:
>>>>
>>>>    Reply to mails with matching email address
>>>> (setq gnus-posting-styles
>>>>         '((address "gottfried <gottfried@posteo.de>")
>>>>          ("X-Message-SMTP-Method" "smtp Posteo-posteo.de 465
>>>>          gottfried@posteo.de")))
>>>>
>>>>
>>>> in the gnus manual it says:
>>>> ;(setq message-send-mail-function 'smtpmail-send-it
>>>> ;                smtpmail-default-smtp-server "smtp Posteo-posteo.de
>>>>                    465 gottfried@posteo.de")
>>>>
>>>> but it doesn´t work as well.
>>> I don't use posteo, but I think the following snippets should get
>>> you
>>> going:
>>> --8<---------------cut here---------------start------------->8---
>>> ;; ~/.gnus
>>> (setq gnus-parameters
>>>         '((".*"
>>>            (posting-style
>>>             (name "gfp")
>>>             (address "gottfried@posteo.de")
>>>             ;; ("X-Message-SMTP-Method" "smtp posteo.de 465")
>>>             ))))
>>> (setq message-send-mail-function 'smtpmail-send-it
>>>         smtpmail-smtp-server "posteo.de"
>>>         smtpmail-smtp-service 465)
>>> ;; ~/.authinfo
>>> machine posteo.de port 465 login gottfried@posteo.de password PASSWORD
>>> --8<---------------cut here---------------end--------------->8---
>>> Note that I like to use `gnus-parameters' as one-stop shop for
>>> setting
>>> all parameters for my groups, incl. the posting style.
>>> Best, Arash
>>


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2451 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 665 bytes --]

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

* Re: sending mail with gnus
  2025-01-08 22:11   ` gfp
  2025-01-08 22:36     ` Arash Esbati
  2025-01-09  3:30     ` Leo Butler
@ 2025-01-10 11:59     ` gfp
  2025-01-10 12:28       ` Eric S Fraga
  2025-01-10 12:47       ` Arash Esbati
  2 siblings, 2 replies; 12+ messages in thread
From: gfp @ 2025-01-10 11:59 UTC (permalink / raw)
  To: Arash Esbati; +Cc: help-gnu-emacs@gnu.org


[-- Attachment #1.1.1: Type: text/plain, Size: 4828 bytes --]

Hi Arash,

I put your gnus.el proposals in my gnus.el
(because mine didn´t work today in sending emails).

when sending emails from gnus there was a problem with your proposal:

opening Emacs the scratch buffer said:

Debugger entered--Lisp error: (void-variable machine)
     load-with-code-conversion("/home/gfp/.config/emacs/gnus.el" 
"/home/gfp/.config/emacs/gnus.el" nil nil)
     load-file("/home/gfp/.config/emacs/gnus.el")
     load-with-code-conversion("/home/gfp/.config/emacs/init.el" 
"/home/gfp/.config/emacs/init.el" t t)
     load("/home/gfp/.config/emacs/init" noerror nomessage)
     startup--load-user-init-file(#f(compiled-function () #<bytecode 
0x1287f5b7c48bb0da>) #f(compiled-function () #<bytecode 
0x4d131ce0e73e6cb>) t)
     command-line()
     normal-top-level()


my gnus.el:

;; get emails
(setq gnus-select-method '(nnnil ""))
(setq gnus-secondary-select-methods
        '((nnimap "posteo"
                  (nnimap-address "posteo.de")
                  (nnnimap-user "gottfried@posteo.de")
                  (nnimap-authenticator login)
                  (nnimap-stream ssl)
                  (nnimap-server-port 993))))


;; send emails according to Arash Esbati
(setq gnus-parameters
        '((".*"
           (posting-style
            (name "gfp")
            (address "gottfried@posteo.de")
            ;; ("X-Message-SMTP-Method" "smtp posteo.de 465")
            ))))

(setq message-send-mail-function 'smtpmail-send-it
        smtpmail-smtp-server "posteo.de"
        smtpmail-smtp-service 465)

;; ~/.authinfo
machine posteo.de port 465 login gottfried@posteo.de password MYPASSWORD.







Am 08.01.25 um 23:11 schrieb gfp:
> Hi Arash,
> 
> thanks for your help.
> I appreciate that very much.
> 
> 1.
> How do you do this? to get this line:
> --8<---------------cut here---------------start------------->8---
> 
> 2.
> I fiddled around for many hours today to get gnus SMTP working
> and to my own great astonishment
> I just managed it some seconds before I got your email.
> 
> my gnus.el:
> ;; get emails
> (setq gnus-select-method '(nnnil ""))
> (setq gnus-secondary-select-methods
>        '((nnimap "posteo"
>                  (nnimap-address "posteo.de")
>                  (nnnimap-user "gottfried@posteo.de")
>                  (nnimap-authenticator login)
>                  (nnimap-stream ssl)
>                  (nnimap-server-port 993))))
> 
> ;; Reply emails
> (setq gnus-posting-styles
>        '((smtpmail-smtp-service)
>          (smtpmail-smtp-server "smtp.posteo.de")
>      (smtpmail-smtp-user "gottfried@posteo.de")
>          (smtpmail-smtp-port 465)))
> 
> 
> So I don´t need your help at the moment. But I will keep it as record, 
> in case I need it.
> 
> Interestingly even I changed my /.authinfo file into /.authinfo.gpg
> it worked.
> 
> I am happy,
> but unfortunately it takes many hours
> to set up every small step in Emacs and Gnus.
> 
> Further questions will arise...
> 
> 
> Kind regards
> 
> Gottfried
> 
> 
> 
> Am 08.01.25 um 21:53 schrieb Arash Esbati:
>> gfp <gfp@posteo.at> writes:
>>
>>> My gnus.el:
>>>
>>>   Reply to mails with matching email address
>>> (setq gnus-posting-styles
>>>        '((address "gottfried <gottfried@posteo.de>")
>>>         ("X-Message-SMTP-Method" "smtp Posteo-posteo.de 465
>>>         gottfried@posteo.de")))
>>>
>>>
>>> in the gnus manual it says:
>>> ;(setq message-send-mail-function 'smtpmail-send-it
>>> ;                smtpmail-default-smtp-server "smtp Posteo-posteo.de
>>>                   465 gottfried@posteo.de")
>>>
>>> but it doesn´t work as well.
>>
>> I don't use posteo, but I think the following snippets should get you
>> going:
>>
>> --8<---------------cut here---------------start------------->8---
>> ;; ~/.gnus
>> (setq gnus-parameters
>>        '((".*"
>>           (posting-style
>>            (name "gfp")
>>            (address "gottfried@posteo.de")
>>            ;; ("X-Message-SMTP-Method" "smtp posteo.de 465")
>>            ))))
>>
>> (setq message-send-mail-function 'smtpmail-send-it
>>        smtpmail-smtp-server "posteo.de"
>>        smtpmail-smtp-service 465)
>>
>> ;; ~/.authinfo
>> machine posteo.de port 465 login gottfried@posteo.de password PASSWORD
>> --8<---------------cut here---------------end--------------->8---
>>
>> Note that I like to use `gnus-parameters' as one-stop shop for setting
>> all parameters for my groups, incl. the posting style.
>>
>> Best, Arash
> 





[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2451 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 665 bytes --]

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

* Re: sending mail with gnus
  2025-01-10 11:59     ` gfp
@ 2025-01-10 12:28       ` Eric S Fraga
  2025-01-10 12:47       ` Arash Esbati
  1 sibling, 0 replies; 12+ messages in thread
From: Eric S Fraga @ 2025-01-10 12:28 UTC (permalink / raw)
  To: help-gnu-emacs

Response below/inline for email gfp wrote:
> (original email sent 10 Jan 2025 at 11:59)
> 
> Debugger entered--Lisp error: (void-variable machine)

[...]

> ;; ~/.authinfo
> machine posteo.de port 465 login gottfried@posteo.de password MYPASSWORD.

These last two lines do not belong in your gnus.el file.  They indicate
that you need the "machine" line in your .authinfo file.

-- 
Eric S Fraga via gnus (Emacs 31.0.50 2025-01-06) on Debian 12.8




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

* Re: sending mail with gnus
  2025-01-10 11:59     ` gfp
  2025-01-10 12:28       ` Eric S Fraga
@ 2025-01-10 12:47       ` Arash Esbati
  1 sibling, 0 replies; 12+ messages in thread
From: Arash Esbati @ 2025-01-10 12:47 UTC (permalink / raw)
  To: gfp; +Cc: help-gnu-emacs@gnu.org

gfp <gfp@posteo.at> writes:

> I put your gnus.el proposals in my gnus.el
> (because mine didn´t work today in sending emails).
>
> when sending emails from gnus there was a problem with your proposal:
>
> opening Emacs the scratch buffer said:
>
> Debugger entered--Lisp error: (void-variable machine)
>     load-with-code-conversion("/home/gfp/.config/emacs/gnus.el"
>     "/home/gfp/.config/emacs/gnus.el" nil nil)
>     load-file("/home/gfp/.config/emacs/gnus.el")
>     load-with-code-conversion("/home/gfp/.config/emacs/init.el"
>     "/home/gfp/.config/emacs/init.el" t t)
>     load("/home/gfp/.config/emacs/init" noerror nomessage)
>     startup--load-user-init-file(#f(compiled-function () #<bytecode
>     0x1287f5b7c48bb0da>) #f(compiled-function () #<bytecode
>     0x4d131ce0e73e6cb>) t)
>     command-line()
>     normal-top-level()

This is expected if you have this line also in your ~/.gnus:

machine posteo.de port 465 login gottfried@posteo.de password MYPASSWORD

My proposal was more to have this part in your ~/.gnus:

--8<---------------cut here---------------start------------->8---
;; get emails
(setq gnus-select-method '(nnnil ""))
(setq gnus-secondary-select-methods
       '((nnimap "posteo"
                 (nnimap-address "posteo.de")
                 (nnnimap-user "gottfried@posteo.de")
                 (nnimap-authenticator login)
                 (nnimap-stream ssl)
                 (nnimap-server-port 993))))


;; send emails according to Arash Esbati
(setq gnus-parameters
       '((".*"
          (posting-style
           (name "gfp")
           (address "gottfried@posteo.de")
           ;; ("X-Message-SMTP-Method" "smtp posteo.de 465")
           ))))

(setq message-send-mail-function 'smtpmail-send-it
       smtpmail-smtp-server "posteo.de"
       smtpmail-smtp-service 465)
--8<---------------cut here---------------end--------------->8---

and add this single line to your ~/.authinfo:

--8<---------------cut here---------------start------------->8---
machine posteo.de port 465 login gottfried@posteo.de password MYPASSWORD
--8<---------------cut here---------------end--------------->8---

I admit I didn't spell it out as I did now.  I thought you would parse
the ;; ~/.authinfo in my last message.

Best, Arash



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

end of thread, other threads:[~2025-01-10 12:47 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-08 13:22 sending mail with gnus gfp
2025-01-08 14:03 ` gfp
2025-01-08 16:17 ` Leo Butler
2025-01-08 20:46 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2025-01-08 20:53 ` Arash Esbati
2025-01-08 22:11   ` gfp
2025-01-08 22:36     ` Arash Esbati
2025-01-09  3:30     ` Leo Butler
2025-01-09  9:16       ` gfp
2025-01-10 11:59     ` gfp
2025-01-10 12:28       ` Eric S Fraga
2025-01-10 12:47       ` Arash Esbati

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 read-only IMAP folder(s) and NNTP newsgroup(s).