Send mail on UNIX
|
Original Message
|
Name: Alpay
Date: October 21, 2002 at 18:08:46 Pacific
Subject: Send mail on UNIXOS: sol9CPU/Ram: 512 |
Comment: Hi, I have a question. how do we send a mail on one line command?? like it should include the.... recipent, subject, body, I found some sources online but, it doesnt send it right away.. I tried pine -url 'mailto:somebody@hotmail.com?subject=My%20subject&body=In%20my%20body' But it goes to mail, and waits me to send it.. I just want to send and finish it at that command Please help me
thanks
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: David Perry
Date: October 21, 2002 at 18:39:51 Pacific
|
Reply: (edit)the basic 'mail' command is limited in features and varies with the OS flavor. Most for example do not support the subject or multiple recipients. cat filename | mail recipient@domainname.com if yours supports a subject it would be with a '-s' flag cat filename | mail -s 'mail subject' recipient@domainname.com you can include attachments with uuencode uuencode filename filename | mail recipient@domainname.com elm if available should support more options.
Report Offensive Follow Up For Removal
|
|
Response Number 2
|
Name: Alpay
Date: October 21, 2002 at 22:10:01 Pacific
|
Reply: (edit)Thanks alot.. its helping me.. I have another question.. what if i want to display the file and display the finger log like cat mailfile | mail $user "is fine" what about cat mailfile finger | egrep $user | mail $user , i dont know thatmuch of scripting but if you can help me i will appreciate it thanks
Report Offensive Follow Up For Removal
|
|
Response Number 3
|
Name: David Perry
Date: October 22, 2002 at 05:33:31 Pacific
|
Reply: (edit)are 'mailfile' and 'finger' two files that exist on your computer? If they are, that syntax should work cat file1 file2 | grep pattern | mail recipient@domainname.com I use this often to send the output of a job to myself such as: df -k | mail recipient@domainname.com
Report Offensive Follow Up For Removal
|
Use following form to reply to current message: