curl --url 'smtps://smtp.xxx.com:465' --ssl --mail-from 'from_email' --mail-rcpt 'to_email' --upload-file mail.txt --user 'smtp_user:smtp_pass'
其中mail.txt的格式
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!