curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: How to find return code/exit code after sending a mail command

From: Daniel Stenberg via curl-users <curl-users_at_cool.haxx.se>
Date: Sun, 11 Oct 2020 11:55:13 +0200 (CEST)

On Sun, 11 Oct 2020, Jason Liam via curl-users wrote:

> I am sending a mail using the command described in the docs and i want to
> know the status of the command that is ,Is the mail sent successfully?How
> can i do that?

when you tell curl to perform something, it will do that. If it fails, it will
tell you with an error message and a non-zero exit code.

If curl says nothing, you can safely consider the command to have worked.

> Below is an example command i am using and the screenshot and i notice that
> the connection is left intact.

That's a technicality that doesn't mean anything here. It just means that curl
*could* have reused the connection again if you would've issued a second
command on the same host name.

> How can i close the connection after success.

It was closed. When curl returns to the shell, there can't be any connection
left alive. Never.

-- 
  / daniel.haxx.se | Commercial curl support up to 24x7 is available!
                   | Private help, bug fixes, support, ports, new features
                   | https://www.wolfssl.com/contact/
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2020-10-11