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 from=huupv@huuphan.com <<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 "huupv@mail.huuphan.com" -s "Test Mail $i" -a "/tmp/quotausage" -S smtp="mail.huuphan.com:25" -S smtp-auth=login -S smtp-auth-user="huupv@mail.huuphan.com" -S smtp-auth-password="123456789" -S ssl-verify=ignore -S nss-config-dir=/etc/ssl/certs another@mail.huuphan.com,pvhuu285@gmail.com
done



Comments

Popular posts from this blog

zimbra some services are not running [Solve problem]

Bash script list all IP addresses connected to Server with Country Information

Zimbra Client host rejected Access denied fixed