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.

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

From: Jason Liam via curl-users <>
Date: Sun, 11 Oct 2020 09:25:59 +0530

 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?Below is an example command i am using and the screenshot and
i notice that the connection is left intact .How can i close the connection
after success.So basically,
I am sending mail to my gmail account from my gmail account and the mail is
sent successfully but i want to know the return status of the command so
that i can utilize it afterwards.In this case the connection is left intact
at the end and i want to know how to find if the mail is sent successfully
or not and also how to close this connect left intact.
curl smtp:// --mail-from --mail-rcpt --upload-file email.txt



(image/png attachment: Screenshot__5271_.png)

Received on 2020-10-11