cl-smtp issueshttps://gitlab.common-lisp.net/cl-smtp/cl-smtp/-/issues2018-01-04T12:32:22Zhttps://gitlab.common-lisp.net/cl-smtp/cl-smtp/-/issues/1Exported symbols don't come through in modern-mode Lisp2018-01-04T12:32:22ZDave CooperExported symbols don't come through in modern-mode LispHi,
To get e.g. (cl-smtp:send-email ...) to be recognized in a so-called "modern-mode" CL, I had to change the export section to be as follows:
```
(defpackage :cl-smtp
(:use :cl :asdf :flexi-streams :trivial-gray-streams)
...Hi,
To get e.g. (cl-smtp:send-email ...) to be recognized in a so-called "modern-mode" CL, I had to change the export section to be as follows:
```
(defpackage :cl-smtp
(:use :cl :asdf :flexi-streams :trivial-gray-streams)
(:export #:send-email
#:with-smtp-mail
#:smtp-error
#:smtp-protocol-error
#:no-supported-authentication-method
#:rcpt-failed
#:ignore-recipient
#:attachment
#:make-attachment
#:attachment-name
#:attachment-data-pathname
#:attachment-mime-type
#:rfc2045-q-encode-string
#:rfc2231-encode-string
#:write-rfc8822-message)
#+nil
(:export "SEND-EMAIL"
"WITH-SMTP-MAIL"
"SMTP-ERROR"
"SMTP-PROTOCOL-ERROR"
"NO-SUPPORTED-AUTHENTICATION-METHOD"
"RCPT-FAILED"
"IGNORE-RECIPIENT"
"ATTACHMENT"
"MAKE-ATTACHMENT"
"ATTACHMENT-NAME"
"ATTACHMENT-DATA-PATHNAME"
"ATTACHMENT-MIME-TYPE"
"RFC2045-Q-ENCODE-STRING"
"RFC2231-ENCODE-STRING"
"WRITE-RFC8822-MESSAGE"))
```
If you're ok with this change, could you roll it in? If so, and if a proper git patch or merge request would be more convenient, then please just let me know.
Best Regards and thank you for all the maintenance effort,
Dave Cooper
https://gitlab.common-lisp.net/cl-smtp/cl-smtp/-/issues/2tests.lisp depends on asdf2018-01-04T12:32:22ZDave Coopertests.lisp depends on asdf
Hi,
As the subject indicates, `test.lisp` contains a reference to `asdf:component-pathname`. This makes it impossible to load a `cl-smtp--all-systems` fasl (as generated by `(asdf:operate 'asdf:monolithic-compile-bundle-op :cl-smtp)...
Hi,
As the subject indicates, `test.lisp` contains a reference to `asdf:component-pathname`. This makes it impossible to load a `cl-smtp--all-systems` fasl (as generated by `(asdf:operate 'asdf:monolithic-compile-bundle-op :cl-smtp)`) into an image which does not have asdf available.
As a possibly temporary workaround, i have commented `"tests"` out of the `:components` section of my `cl-smtp.asd`. But in general, tests probably don't need to be built-in by default into a production system. Perhaps the tests could be made into a static-file, or maybe broken out into their own `:cl-smtp-tests` system, and not compiled & loaded by default with the `:cl-smtp` system?
Regards,
Dave
https://gitlab.common-lisp.net/cl-smtp/cl-smtp/-/issues/3RCPT TO wrong format2019-04-09T18:24:11ZAdam KrupickaRCPT TO wrong formatHi!
In case that one tries to send a mail from an email address of the form `Name <mail@domain.com>`, cl-smtp does not work with certain SMTP servers, such as Google SMTP. This is because the address (w/ the name) is sent verbatim in th...Hi!
In case that one tries to send a mail from an email address of the form `Name <mail@domain.com>`, cl-smtp does not work with certain SMTP servers, such as Google SMTP. This is because the address (w/ the name) is sent verbatim in the `RCPT TO` command (e.g. `RCPT TO: <Name <mail@domain.com>>`), which causes the SMTP server to throw an error, complaining about invalid syntax. I fixed this by stripping the name part from the address in the `RCPT TO` command in case that it is present.
Since I can't open a pull request here, I'm attaching the patch here[cl-smtp.patch](/uploads/3e7ff14a6240173f2f65403b82cb8570/cl-smtp.patch). It makes an assumption about the email address not being malformed.
Cheers!https://gitlab.common-lisp.net/cl-smtp/cl-smtp/-/issues/4Problem with subject header2019-03-20T10:48:27ZVyacheslavProblem with subject headerHello. Thanks for you library!
I think there is a problem in this function (https://gitlab.common-lisp.net/cl-smtp/cl-smtp/blob/master/cl-smtp.lisp#L70). When I send string with non-ascii characters gmail is eat spaces, tabs and, I thin...Hello. Thanks for you library!
I think there is a problem in this function (https://gitlab.common-lisp.net/cl-smtp/cl-smtp/blob/master/cl-smtp.lisp#L70). When I send string with non-ascii characters gmail is eat spaces, tabs and, I think, other ascii-characters. When I use non-ascii characters, string is mix of encoded non-ascii chars and not encoded ascii. For example, when I try this:
```common_list
(cl-smtp::rfc2045-q-encode-string "Текст с пробелами")
```
I get: `"=?UTF-8?Q?=D0=A2=D0=B5=D0=BA=D1=81=D1=82?= =?UTF-8?Q?=D1=81?= =?UTF-8?Q?=D0=BF=D1=80=D0=BE=D0=B1=D0=B5=D0=BB=D0=B0=D0=BC=D0=B8?="`
When I slightly fixed function `rfc2045-q-encode-string` and get this: `"=?UTF-8?Q?=D0=A2=D0=B5=D0=BA=D1=81=D1=82=20=D1=81=20=D0=BF=D1=80=D0=BE=D0=B1=D0=B5=D0=BB=D0=B0=D0=BC=D0=B8?="`, gmail is correctly displayed subject in letter.https://gitlab.common-lisp.net/cl-smtp/cl-smtp/-/issues/5send-email returns non-NIL upon success2024-03-28T21:30:11ZDuncan Baynesend-email returns non-NIL upon successAccording to the documentation:
```
(cl-smtp:send-email host from to subject message
&key (port 25) cc bcc reply-to extra-headers html-message
authentication attachments (buffer-size 256) ssl)
Se...According to the documentation:
```
(cl-smtp:send-email host from to subject message
&key (port 25) cc bcc reply-to extra-headers html-message
authentication attachments (buffer-size 256) ssl)
Send email.
Returns nil or error with message
```
... but in practice, it's returning a non-NIL result upon success:
```
CL-USER> (cl-smtp:send-email "smtp.tpg.com.au" "duncan@example.com" "duncan@example.com" "Test" "Test")
("2.0.0 mail15.tpgi.com.au closing connection")
```https://gitlab.common-lisp.net/cl-smtp/cl-smtp/-/issues/7HELO commands ignore :local-hostname parameter to send-email2021-02-16T20:50:22Zx0rHELO commands ignore :local-hostname parameter to send-emailThe `smtp-handshake` function uses the supplied `local-hostname` keyword
parameter when sending an EHLO command, but uses
`(usocket::get-host-name)` directly for HELO commands.
This causes sending e-mails to fail on my setup, because my...The `smtp-handshake` function uses the supplied `local-hostname` keyword
parameter when sending an EHLO command, but uses
`(usocket::get-host-name)` directly for HELO commands.
This causes sending e-mails to fail on my setup, because my Postfix
server is configured to reject HELO with non-FQDN names
(`reject_non_fqdn_hostname`). This happens despite supplying a
fully-qualified `:local-hostname` to `send-email`.https://gitlab.common-lisp.net/cl-smtp/cl-smtp/-/issues/9Message-id header2023-12-30T11:33:13Zcage2Message-id headerHi!
I have found that some SMTP server (notably gmail) does not accepts a
message without a proper message-id header.
I have wrote some simple code to generate the header's value following
(more or less) suggestions in this document:
...Hi!
I have found that some SMTP server (notably gmail) does not accepts a
message without a proper message-id header.
I have wrote some simple code to generate the header's value following
(more or less) suggestions in this document:
https://www.jwz.org/doc/mid.html
the actual code follow, please consider to add it to cl-smtp.
Bye an thanks!
C.
``` lisp
(defparameter *base36-alphabet* "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ")
(defun encode-base-36 (number &optional (accum '()))
(if (<= number 0)
(coerce (reverse accum) 'string)
(let ((new-number (truncate (/ number 36)))
(remainder (rem number 36)))
(encode-base-36 new-number (push (elt *base36-alphabet* remainder)
accum)))))
(defun generate-mail-message-id (&optional (local-host (usocket::get-host-name)))
(format nil
"<~a~a.~a@~a>"
(encode-base-36 (get-universal-time))
(random 2048)
(random 2048)
local-host))
```https://gitlab.common-lisp.net/cl-smtp/cl-smtp/-/issues/10Feature: Opt-out for SSL certificate verification2024-03-28T08:48:04ZKilian M. HaemmerleFeature: Opt-out for SSL certificate verificationFor using encrypted mail services via _SMTP_, e.g. Protonmail offers a local [bridge application](https://proton.me/mail/bridge).
While trying to use this client with _CL-SMTP_ I get the following error:
_SSL verify error: 18 X509_V_ER...For using encrypted mail services via _SMTP_, e.g. Protonmail offers a local [bridge application](https://proton.me/mail/bridge).
While trying to use this client with _CL-SMTP_ I get the following error:
_SSL verify error: 18 X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT_
To get this bridge working we basically have to opt-out of SSL Certificate verfication of _cl+ssl_.
This can be done by supplying the value _NIL_ to the _verify_ keyword of _cl+ssl:make-ssl-client-stream_ and adding a keyword _verify_ / _verify-certificate_ (default value _T_) to _cl-smtp:send-email_ and _with-smtp-mail_.
I would be happy to supply a MR if granted access to this project.