Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • C cl-smtp
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 6
    • Issues 6
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • cl-smtp
  • cl-smtp
  • Issues
  • #6
Closed
Open
Issue created Apr 26, 2020 by Martin Buchmann@MartinBuchmann

The condition #<SMTP-PROTOCOL-ERROR a command failed:

I have an issue using cl-smtp. I installed it using quicklisp and tried to send a simple test email using my gmail account:

(send-email *smtp-server* *mail-user* "Martin.Buchmann@me.com" "test" "This is a test"
            :authentication '(*mail-user* *password*) :port 587 :ssl :starttls)

having set the variables *smtp-server*, *mail-user* and *password* accordingly to my data. I end up with the following error message in Slime’s debugger:

The condition #<SMTP-PROTOCOL-ERROR a command failed:
command: "AUTH PLAIN Kk1BSUwtVVNFUioAKk1BSUwtVVNFUioAKlBBU1NXT1JEKg==" expected: 235 response-code: 535 response-message: 5.7.8  https://support.google.com/mail/?p=BadCredentials f18sm19794471wrq.29 - gsmtp> occurred with errno: 0.
   [Condition of type USOCKET:UNKNOWN-ERROR]

Restarts:
 0: [RETRY] Retry SLIME interactive evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [ABORT] abort thread (#<THREAD "worker" RUNNING {1002DE18C3}>)

Backtrace:
  0: (USOCKET::HANDLE-CONDITION #<SMTP-PROTOCOL-ERROR {1002E22D13}> #<USOCKET:STREAM-USOCKET {1002DF3373}> NIL)
  1: (SB-KERNEL::%SIGNAL #<SMTP-PROTOCOL-ERROR {1002E22D13}>)
  2: (ERROR SMTP-PROTOCOL-ERROR :COMMAND "AUTH PLAIN Kk1BSUwtVVNFUioAKk1BSUwtVVNFUioAKlBBU1NXT1JEKg==" :EXPECTED-RESPONSE-CODE 235 :RESPONSE-CODE 535 :RESPONSE-MESSAGE "5.7.8  https://support.google.com/ma..
  3: (CL-SMTP::SMTP-COMMAND #<FLEXI-STREAMS:FLEXI-IO-STREAM {1002E066E3}> "AUTH PLAIN Kk1BSUwtVVNFUioAKk1BSUwtVVNFUioAKlBBU1NXT1JEKg==" 235 :CONDITION-CLASS SMTP-PROTOCOL-ERROR :CONDITION-ARGUMENTS NIL)
  4: (CL-SMTP::SMTP-HANDSHAKE #<FLEXI-STREAMS:FLEXI-IO-STREAM {1002E066E3}> :AUTHENTICATION (*MAIL-USER* *PASSWORD*) :SSL :STARTTLS :LOCAL-HOSTNAME "iBuchi.fritz.box")
  5: (CL-SMTP::DO-WITH-SMTP-MAIL "smtp.gmail.com" "Martin.Buchmann@googlemail.com" ("Martin.Buchmann@me.com") #<CLOSURE (LAMBDA (STREAM) :IN CL-SMTP::SEND-SMTP) {1002DF2F6B}> :PORT 587 :AUTHENTICATION (*MA..
  6: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SEND-EMAIL *SMTP-SERVER* *MAIL-USER* "Martin.Buchmann@me.com" "test" "This is a test" ...) #<NULL-LEXENV>)
  7: (EVAL (SEND-EMAIL *SMTP-SERVER* *MAIL-USER* "Martin.Buchmann@me.com" "test" "This is a test" ...))
  8: ((LAMBDA NIL :IN SWANK:INTERACTIVE-EVAL))
  9: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME interactive evaluation request." #<CLOSURE (LAMBDA NIL :IN SWANK:INTERACTIVE-EVAL) {1002DF287B}>)
 10: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA NIL :IN SWANK:INTERACTIVE-EVAL) {1002DF285B}>)
 11: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:INTERACTIVE-EVAL "(send-email *smtp-server* *mail-user* \"Martin.Buchmann@me.com\" \"test\" \"This is a test\" ..)
 12: (EVAL (SWANK:INTERACTIVE-EVAL "(send-email *smtp-server* *mail-user* \"Martin.Buchmann@me.com\" \"test\" \"This is a test\" ..)
 13: (SWANK:EVAL-FOR-EMACS (SWANK:INTERACTIVE-EVAL "(send-email *smtp-server* *mail-user* \"Martin.Buchmann@me.com\" \"test\" \"This is a test\" ..)
 14: ((LAMBDA NIL :IN SWANK::SPAWN-WORKER-THREAD))
 15: (SWANK/SBCL::CALL-WITH-BREAK-HOOK #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<FUNCTION (LAMBDA NIL :IN SWANK::SPAWN-WORKER-THREAD) {2276193B}>)
 16: ((FLET SWANK/BACKEND:CALL-WITH-DEBUGGER-HOOK :IN "/Users/Martin/quicklisp/dists/quicklisp/software/slime-v2.24/swank/sbcl.lisp") #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<FUNCTION (LAMBDA NIL :IN SWANK:..
 17: (SWANK::CALL-WITH-BINDINGS ((*STANDARD-INPUT* . #<SWANK/GRAY::SLIME-INPUT-STREAM {10046D3193}>)) #<FUNCTION (LAMBDA NIL :IN SWANK::SPAWN-WORKER-THREAD) {22761BAB}>)
 18: ((LAMBDA NIL :IN SWANK::SPAWN-WORKER-THREAD))
 19: ((FLET SB-UNIX::BODY :IN SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE))
 20: ((FLET "WITHOUT-INTERRUPTS-BODY-4" :IN SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE))
 21: ((FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE))
 22: ((FLET "WITHOUT-INTERRUPTS-BODY-1" :IN SB-THREAD::CALL-WITH-MUTEX))
 23: (SB-THREAD::CALL-WITH-MUTEX #<CLOSURE (FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE) {848BE7B}> #<SB-THREAD:MUTEX "thread result lock" owner: #<SB-THREAD:THREAD "worker" ..
 24: (SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE #<SB-THREAD:THREAD "worker" RUNNING {1002DE18C3}> NIL #<CLOSURE (LAMBDA NIL :IN SWANK::SPAWN-WORKER-THREAD) {1002DE186B}> NIL)
 25: ("foreign function: call_into_lisp")
 26: ("foreign function: new_thread_trampoline")

I get the following debugging output:

"from server: 220 smtp.gmail.com ESMTP f18sm19794471wrq.29 - gsmtp" 
"to server: EHLO iBuchi.fritz.box" 
"from server: 250-smtp.gmail.com at your service, [89.247.253.239]" 
"from server: 250-SIZE 35882577" 
"from server: 250-8BITMIME" 
"from server: 250-STARTTLS" 
"from server: 250-ENHANCEDSTATUSCODES" 
"from server: 250-PIPELINING" 
"from server: 250-CHUNKING" 
"from server: 250 SMTPUTF8" 
"this server supports TLS" 
"to server: STARTTLS" 
"from server: 220 2.0.0 Ready to start TLS" 
"to server: EHLO iBuchi.fritz.box" 
"from server: 250-smtp.gmail.com at your service, [89.247.253.239]" 
"from server: 250-SIZE 35882577" 
"from server: 250-8BITMIME" 
"from server: 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH" 
"from server: 250-ENHANCEDSTATUSCODES" 
"from server: 250-PIPELINING" 
"from server: 250-CHUNKING" 
"from server: 250 SMTPUTF8" 
"to server: AUTH PLAIN Kk1BSUwtVVNFUioAKk1BSUwtVVNFUioAKlBBU1NXT1JEKg==" 
"from server: 535-5.7.8 Username and Password not accepted. Learn more at" 
"from server: 535 5.7.8  https://support.google.com/mail/?p=BadCredentials f18sm19794471wrq.29 - gsmtp"

I tried different settings for the tls keyword without any change. I also tried another mail account which gave basically the same error. What am I missing? Thanks for any hint!

Edited Apr 26, 2020 by Martin Buchmann
Assignee
Assign to
Time tracking