Sending email from Linux command line

0
77

Sending Simple mail

root@mypc [~]# mail -s “test message from centos” meabi@meabi.com
hello from centos linux command line
Ctrl+D
root@mypc [~]#

Here is the received message

image

 

Send with an attachment

For this create a blank file first

root@odc [~/mail]# touch attachment

Now the sending part

root@odc [~/mail]# mail -a ./attachment  abhilash@morbits.net < ./attachment
No message, no subject; hope that’s ok
root@odc [~/mail]#

Here what we did is , redirecting attachment content as the body of the mail, that is Null as we used touch for creating that file

Inbox view

image

SHARE
Previous articleZip command in centos
Next articleSkype Login screen messed up
abhilash, is a programmer by profession and a technology addict with a passion towards browsing , shopping and imaging . My views may be biased on reviews. all images and videos are copyrighted to respective owners.

LEAVE A REPLY

Please enter your comment!
Please enter your name here