How to send a E-Mail using the TerminalSystem: BeOS, Zeta If you want to send an E-Mail using the terminal you need to have a email account for BeMail. The terminal command to send the mail, need this account as send mail address. Then you need to activate the Mail Deamon, because the mail will be send over this service. The mail need to be available a text file. 1. Mail Account You can read how to set up the mail account using BeMail using this tutorial here (only in german availalbe). 2. Activate Mail Deamon To activate the mail deamon, open the termianl and typ in following command:
The & sign allow to use the terminal window after running a command. Also you don't can deactivate the deamon closing the terminal.
3. Send Mail At the moment you have activate the deamon you can send a mail using the terminal:
- To send the mail we use the command mail. To see sending the mail in verbose mode we add a "-v". - With "-s "Subject" we add a subject fort he mail. - Then we add the target mail adresse "Address@Mailaddress.com". - With "< /Path/to/Mailfile.txt" we add the mailfile. 4. Deactivate the Mail Deamon It is important to deactivate the Mail Deamon when you have send the mail. If you want to include this way to send mail into your own application or script activate and deactivate the deamon every time you run it. Deactivate the Mail Deamon:
Tutorial by Christian Albrecht (Lelldorin) August 2007 Made available by BeSly, the BeOS, Haiku and Zeta Knowledgebase. |