Cannot send email in emacs via smtpmail + starttls

0

I cannot send emails in emacs via smtpmail with starttls. Here are my configs:

  smtpmail-stream-type         'starttls
  smtpmail-default-smtp-server "posteo.de"
  smtpmail-smtp-server         "posteo.de"
  smtpmail-smtp-service        587

And here is the debug output:

220 submission02.posteo.de ESMTP Postfix
250-submission02.posteo.de
250-PIPELINING
250-SIZE 76800000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
220 2.0.0 Ready to start TLS
250-submission02.posteo.de
250-PIPELINING
250-SIZE 76800000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
AUTH PLAIN <omitted>
535 5.7.8 Error: authentication failed: 
QUIT
221 2.0.0 Bye

Process smtpmail connection broken by remote peer

Any suggestions what is going on would be great -- thanks!

user3321294

Posted 2019-09-11T05:31:37.460

Reputation: 83

Answers

0

Using mu4e (and a posteo service...)

my working config has :

(setq mu4e-sent-folder "/Sent"
      mu4e-drafts-folder "/Drafts"
      mu4e-trash-folder "/Trash"
      message-send-mail-function 'smtpmail-send-it
      user-mail-address "foo@posteo.net"
      user-full-name  "Foo buzz"
      smtpmail-default-smtp-server "smtp.posteo.de"
      smtpmail-smtp-server "posteo.de"
      smtpmail-stream-type 'starttls
      smtpmail-smtp-service 587)

Don't forget to: (require 'smtpmail)

manandearth

Posted 2019-09-11T05:31:37.460

Reputation: 153

Thanks! I copied your setting but still had the same error. Do you have any specific encryption settings for tls? – user3321294 – 2019-09-27T18:56:37.863

I use offlineimap and in my offlineimaprc file I have the preference: sslcacertfile = /etc/ssl/certs/ca-certificates.crt – manandearth – 2019-09-27T19:24:55.213

Thanks -- I have the same in my offlineimaprc, but getting emails is also not the problem; it is sending them via smtpmail. – user3321294 – 2019-10-01T20:00:48.537

Do you use .authinfo – user3321294 – 2019-10-01T20:03:58.773

I found the error -- the .authinfo file needs to include the full email address, not just the username, as login. This is different from gmail, where the username is fine. Thank you for your help! – user3321294 – 2019-10-01T20:08:43.943