[cl-smtp-devel] bug: external-format is ignored when SSL is used

Anton Vodonosov avodonosov at yandex.ru
Fri Aug 23 00:05:22 UTC 2013


I have just tried the latest cl-smtp - it does not have the encoding problem,
so my patch is only necessary for the old version of cl-smtp.

I will open an issue at Quicklisp to update cl-smtp.

BTW, a string literal in the cl-smpt.lisp, the form
  (define-condition no-supported-authentication-method ...)
contains a Tilde Newline construct.

This breaks compilation on SBCL/Windows, because when you
checkout from CVS, CVS converts Unix newline character <LF>
to the Windows newline pair <CR><LF>, and thus the Tile Newline
becomes Tilea Return, which is unknown construct. SBCL
reports an error:

; file: C:/Users/anton/projects/cl-smtp/cl-smtp.lisp
; in: DEFINE-CONDITION NO-SUPPORTED-AUTHENTICATION-METHOD
;     (FORMAT STREAM
;             "SMTP authentication has been requested, but the SMTP server did not advertise any ~

;                                  supported authentication scheme.  Features announced: ~{~S~^, ~}"
;             (CL-SMTP::FEATURES CONDITION))
; 
; caught ERROR:
;   during macroexpansion of
;   (FORMATTER
;    "SMTP authentication has been requested, but the SMTP server did not advertise any ~

;                                  supported authentication scheme.  Features announced: ~{~S~^, ~}").
;   Use *BREAK-ON-SIGNALS* to intercept.
;   
;    error in FORMAT: unknown directive (character: Return)
;     SMTP authentication has been requested, but the SMTP server did not advertise any ~

;                                  supported authentication scheme.  Features announced: ~{~S~^, ~}
;                                                                                        ^
..; 
  ; compilation unit aborted
  ;   caught 1 fatal ERROR condition
  ;   caught 1 ERROR condition


22.08.2013, 18:00, "Jan Idzikowski" <jan.idzikowski at knowledgetools.de>:
> Hi Anton,
>
> that is a old version, the version number is a date (YYYYMMDD),
> so you can see your version is from november 2011.
> I never used quicklisp, try clbuild.
>
> Am Donnerstag, den 22.08.2013, 17:18 +0400 schrieb Anton Vodonosov:
>
>>  Hi Jan.
>>
>>  I am using cl-smtp from the lates Quicklisp.
>>  Turns out the tarball included into quickisp is
>>  called cl-smtp-20101107-http, so probably it is not latest.
>>
>>  22.08.2013, 14:38, "Jan Idzikowski" <jan.idzikowski at knowledgetools.de>:
>>>  Hello Anton,
>>>
>>>  thanks for the patch, I will apply the patch.
>>>
>>>  But I have a question, do you use the latest version of cl-smtp?
>>>  Since Version 20130118.1 cl-smtp check for non ascii characters in
>>>  message string and send message as quoted-printable.
>>>
>>>  Best regards
>>>  Jan
>>>
>>>  Am Donnerstag, den 22.08.2013, 06:24 +0400 schrieb Anton Vodonosov:
>>>>   Hello.
>>>>
>>>>   I've just hit a bug when used CL-SMPT - it failed
>>>>   to send a message with non-ascii characters
>>>>   over secure connection, despite the default
>>>>   :external-format :utf-8 is used.
>>>>
>>>>   The reason is in the function cl-smtp::smtp-handshake.
>>>>   When SSL is used, the function throws away the original
>>>>   flexi-stream having correct external-forma and
>>>>   creates new flexi-stream, with hardcoded latin-1 external
>>>>   format.
>>>>
>>>>   The attached patch fixes that by reusing the flexi-stream-external-format
>>>>   of the original flexi-stream when creating the new one.
>>>>
>>>>   Best regards,
>>>>   - Anton



More information about the cl-smtp-devel mailing list