Knowledgebase
emscom > emscom Help Desk > Knowledgebase

Search help:


More Curl

Solution

 

//One liner to send an email via smtp

curl -vn --user 'username:password' --url smtps://smtp.server.com:465 
--mail-from "postmasterr@sender.net"
--mail-rcpt "postmaster@recipient.net"
--upload-file <(echo -e "Subject:Mail Test 1\nTest message sent with CURL.\n")


//On windows a test file needs to created

curl -vn --user "username:password" --url smtps://smtp.server.com:465
--mail-from "postmasterr@sender.net"
--mail-rcpt "postmaster@recipient.net"
--upload-file mail-test.txt

#mail-test.txt
Subject: Mail test 1
Text messsage sent from CURL.

 
Was this article helpful? yes / no
Related articles Webmail access
spf, dkim and dmarc records
Email Hijack
Exchange - powershell: create all mail users distribution list
Exchange - Shared Mailbox Access (macmail)
Article details
Article ID: 267
Category: Networking
Date added: 30-07-2026 11:21:46
Views: 3
Rating (Votes): Article not rated yet (0)

 
« Go back

 
Powered by Help Desk Software HESK, in partnership with SysAid Technologies