sending mail from command line in FreeBSD 6.1

rob rob at
Thu Aug 24 20:22:54 IST 2006

Not sure if this will work in FreeBSD, but I use this with CentOS

Usage:  sendEmail [options]   or   command | sendEmail [options]

    -f <from>            from email address
    -t <to> [<to>]       to email address(es) (space separated list)

    -u <subject>         (this will soon be -s, and -s will become -h[ost])
    -m <message>         if -m is absent the message is read from STDIN
    -s <server[:port]>   default is localhost:25

    -a <file> [<file>]   file attachment(s)
    -cc  <to> [<to>]     cc  email address(es)
    -bcc <to> [<to>]     bcc email address(es)

    -l <logfile>         log to the specified file
    -v                   verbosity - use multiple times for greater effect
    -q                   be quiet (no stdout output)

-----Original Message-----
From: mailscanner-bounces at
[mailto:mailscanner-bounces at] On Behalf Of emm1
Sent: Thursday, August 24, 2006 1:55 PM
To: MailScanner discussion
Subject: sending mail from command line in FreeBSD 6.1

Anyone know how i can send a mail to user from command line in FreeBSD
with an attachment ? I tried sendmail -toi user at < test.txt
but the test.txt doesn't come as an attachment, the contents of the
file comes in the body of the mail.

MailScanner mailing list
mailscanner at

Before posting, read

Support MailScanner development - buy the book off the website! 

More information about the MailScanner mailing list