1

Having issues connecting to a SMTP server with curl. The script I am running has worked on other hosts so its an issue with curl. Ubuntu version 16.04 (xenial). The pre installed curl version was 7.47. Everytime I run a command similar to this curl --url \'smtps://smtp.gmail.com:465\' ...the rest of the args I get the error

curl: (1) Protocol "'smtps" not supported or disabled in libcurl

Very strange since I've had previous ubuntu installations that came with curl pre installed and had smtp support.

curl --version

outputs this

curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 librtmp/2.3 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets

as you can see smtp and smtps are listed as protocols but i am unsure whether they are the ones enabled or supported?

Heres what I've done following the advice of similar threads

uninstalled curl with sudo apt-get remove curl then followed the answer here

whenever it was time to run the configure script i gave it the following options

./configure --with-ssl --enable-smtp --enable-smtps

after i finished, i got the same error... Then i tried reinstalling with apt-get install curl. but still get the same error. What gives? if there are no ways to resolve this gracefully, could I accomplish the same thing with wget?

1
  • I just tested your start with my account and I got the same error with the \' on the smtps part. If I removed those it worked fine. Leaving the ' or no quotes there didn't matter and it worked fine either way. – Terrance Oct 1 '18 at 23:10
2

You have a leading apostrophe (') since you're escaping it with a backslash (\) - The output is a bit hard to read but curl is trying to tell you this, but since it's next to some double quotes (") it doesn't stand out:

curl: (1) Protocol "'smtps" not supported or disabled in libcurl
--------------------^
1
  • holy cow you are 100% correct, I was copying and pasting the test command and I didnt realize the ' was still in there. Everything worked and I just threw away a few hours of my life haha. Thanks for pointing that out. – Alan Oct 2 '18 at 0:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.