Send e-mail with cURL


cURL supports sending data to an SMTP server

cURL, in combination with command-line options, sends an email to a recipient. Originally the name stood for “see URL” and was later reinterpreted to the current Backronym cURL.

The basic command for sending an email using cURL.

Example application of cURL SMTP in the terminal emulator:

The following is the output in the terminal:

The -v parameter generates the verbose output.

The file email.txt is uploaded and sent by cURL to the SMTP relay.

The contents of email.txt, the From, To, Subject, and Date lines are data fields that serve the Simple Mail Transfer Protocol.