0
libCurl for SMTP
Anyone know how to use libCurl for email transfer ? There's example code on their site, but the operations are not explained.
1 Answer
+ 2
curl --url 'smtps://smtp.gmail.com:465' --ssl-reqd \
--mail-from 'username@gmail.com' --mail-rcpt 'john@example.com' \
--upload-file mail.txt --user 'username@gmail.com:password' --insecure
mail.txt file contents:-
From: "User Name" <username@gmail.com>
To: "John Smith" <john@example.com>
Subject: This is a test
Hi John,
Iâm sending this mail with curl thru my gmail account.
Bye!