-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSL/TLS communication isn't possible when using Pool #77
Comments
Pool.Send hangs on pool.build because use (net.Dial) on TLS connection. |
Hello, I think a fix would be to have the pool have an ExplicitSSL (or ExplicitTLS) member and the dial would be done by the appropriate mechanism in build. Thoughts ? |
I'm having the same problem as you, using pool to send emails with :sent error:timed out, sending without pool works fine, I don't think pool is working properly! |
@jeefs Can you give me the two config, the one that works and the one that doesn't work ? |
@slurdge I've switched to the official package net/stmp to send emails and use ssl support for encrypted emails, no problems so far! |
I gave up using pooled connections |
I tried to use the the
Pool
for sending emails to a SMTP server which offers SSL/TLS connections (not STARTTLS) and thepool.Send
hangs onpool.build
; that doesn't happen withEmail.SendWithTLS
because it uses the TLS package to dial the connection.Hence the pool type cannot send emails using SSL/TLS connections, only send emails on unencrypted connections or encrypted ones through STARTTLS.
On the other hand, in ab implementation of a function which checks SMTP server connections which I've done, I deal differently.
When the server advertise the STARTTLS connection, there is no need to dial a TLS connection, a unencrypted dial (
net.Dial
) works and after, it's theclient.StartTLS
which upgrades the connection, that's mostly is how the pool works. The thing is that it differs from the implementation ofEmail.SendWithTLS
function, which always dial the connection with TLS independently if STARTTLS is available or not.I cannot say if that's an issue or not, because I haven't used the
Email.SendWithTLS
of this package, so I'm mostly reporting as an insight.The text was updated successfully, but these errors were encountered: