Here is how to invoke the script using Gmail SMTP:
./smtp-tls-test.sh smtp.gmail.com 587 gmailUser@gmail.com gmailUser@gmail.com "From Openssl using authentication over TLS" "Just a test" gmailUser@gmail.com gmailUserPasswordOf course this is offered just as (if you wish) curiosity because mailx will do the work for us:
$ sudo apt install mailutils $ echo "body" | mailx -r "sender@sample.com" -s "subject" -S smtp="host:port" -S smtp-use-starttls -S smtp-auth=login -S smtp-auth-user="username" -S smtp-auth-password="password" -S ssl-verify=ignore "receiver@sample.com"
No comments:
Post a Comment