Huu Phan | Blog Linux operating system | Linux operating system -Blog Huu Phan | www.huuphan.com
huuphan.com. Powered by Blogger.

My blog about Open Source: Zimbra Mail Server,linux,bash script,centos,linux command...

How to send email using mail command in linux

how to send email using mail command in linux

in my post, i'm use mail command to send message email.

mail -s "Subject title huuphan.com" -S [email protected] <<EOF
----------------------------------------
The content email
Hello
phan van huu
My site: huuphan.com
-----------------------------------------
EOF

The script sending 100 email from command.
#!/bin/sh
i=1
for (( i = 1 ; i <= 100 ; i++ ));
do 
echo "Test Mail $i, Send from mail.huuphan.com" | mailx -v -r "[email protected]" -s "Test Mail $i" -a "/tmp/quotausage" -S smtp="mail.huuphan.com:25" -S smtp-auth=login -S smtp-auth-user="[email protected]" -S smtp-auth-password="123456789" -S ssl-verify=ignore -S nss-config-dir=/etc/ssl/certs [email protected],[email protected]
done



post new :

Huu Phan | Blog Linux operating system | Huu Phan ~ Zimbra Mail Server,linux,bash script,centos,linux command | www.huuphan.com

This Blog is protected by DMCA.com