Page 1 of 1

Sending an SMTP Mail using Curl in a Batch file

Posted: 18 Apr 2020 16:05
by X3nion
Hey there!

I'd like to send an email using curl in a batch file.
I tried the following lines:

curl --url 'smtps://securesmtp.t-online.de:587' --ssl-reqd --cacert cacert.pem --mail-from 'user@t-online.de' --mail-rcpt 'user@t-online.de' --user 'user@t-online.de:password'

And this works out well!

Now I'd like to make the connection more secure. In the end, it says: " Connection #0 to host securesmtp.t-online.de left intact"
How could this be closed?

And furthermore, how could I kind of protect the password I type in?

Could someone help me with that?

I'd be grateful for every help!

Kind regards,
X3nion

Re: Sending an SMTP Mail using Curl in a Batch file

Posted: 22 Apr 2020 13:57
by scavenger
1. if you want to use a password on a command line that is not possible.
please give more context first

2. more secure than ssl? i don't understand. what is more secure than an SSL tunnel?

Re: Sending an SMTP Mail using Curl in a Batch file

Posted: 24 Apr 2020 05:25
by X3nion
Hey scavenger and thanks for your reply!

Well the curl-command as posted in the first post works very well and sends a mail to me. And there I provided username+password in the command line.

However, the password is sent without being obscured or decrypted somehow.

Is there any possibility to make the transmission more secure?

Kind regards,
X3nion