hedwig-im / hedwig

An Adapter-based Bot Framework for Elixir Applications
MIT License
650 stars 73 forks source link

Crash when trying to create a secure connection #66

Closed foldericon closed 7 years ago

foldericon commented 7 years ago

So my SMTP server is listening on localhost and I chose .plain for the secure option. Nonetheless, Hedwig tries to establish a TLS secured connection when the server supports it. And that's where my crash occurs. One of the parameters you pass to TLS.Socketin your starttls method is nil and gets force unwrapped later. I hope that helps fixing the issue, but you should also consider changing the approach here. Why do you want to force a TLS connection just because the server supports it? Some people just want to connect to an SMTP server that is listening on the loopback adapter and I don't get the point of creating an encrypted connection to localhost.

scrogson commented 7 years ago

@foldericon I'm not following how this has anything to do with Hedwig itself. Can you explain in more detail?

foldericon commented 7 years ago

Oh shit, I'm sorry, this is the wrong project, I meant https://github.com/onevcat/Hedwig I should just go to sleep next time.

scrogson commented 7 years ago

No worries, thanks for clarifying.