sending mail from command line in FreeBSD 6.1
Richard Potter
rpotter at rpcs.net
Fri Aug 25 18:32:33 IST 2006
Try this:
uuencode /path/to/attachment attachment.name | mail -s "Subject" address
So..
uuencode /tmp/testfile.xls testfile.xls | mail -s "Test" you at where
Works for me on AIX and linux.
Richard
On Thu, Aug 24, 2006 at 08:25:38PM +0000, emm1 wrote:
> The contents of the file is put in the body instead of being delivered
> as an attachment with that command. :)
>
> On 8/24/06, Remy de Ruysscher <rdr at xs4all.nl> wrote:
> >
> >Hi,
> >Use cat file | mailx -s "Subject" receipient -c "another receipient"
> >
> >Regards,
> >Remy
> >
> >On Thu, August 24, 2006 21:22, rob wrote:
> >> Not sure if this will work in FreeBSD, but I use this with CentOS
> >>
> >> Usage: sendEmail [options] or command | sendEmail [options]
> >>
> >> Required:
> >> -f <from> from email address
> >> -t <to> [<to>] to email address(es) (space separated list)
> >>
> >> Common:
> >> -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
> >>
> >> Optional:
> >> -a <file> [<file>] file attachment(s)
> >> -cc <to> [<to>] cc email address(es)
> >> -bcc <to> [<to>] bcc email address(es)
> >>
> >> Paranormal:
> >> -l <logfile> log to the specified file
> >> -v verbosity - use multiple times for greater
> >effect
> >> -q be quiet (no stdout output)
> >>
> >> http://caspian.dotconf.net/menu/Software/SendEmail/
> >>
> >> -----Original Message-----
> >> From: mailscanner-bounces at lists.mailscanner.info
> >> [mailto:mailscanner-bounces at lists.mailscanner.info] 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 domain.com < test.txt
> >> but the test.txt doesn't come as an attachment, the contents of the
> >> file comes in the body of the mail.
> >>
> >> Thanks!
> >> --
> >> MailScanner mailing list
> >> mailscanner at lists.mailscanner.info
> >> http://lists.mailscanner.info/mailman/listinfo/mailscanner
> >>
> >> Before posting, read http://wiki.mailscanner.info/posting
> >>
> >> Support MailScanner development - buy the book off the website!
> >>
> >> --
> >> MailScanner mailing list
> >> mailscanner at lists.mailscanner.info
> >> http://lists.mailscanner.info/mailman/listinfo/mailscanner
> >>
> >> Before posting, read http://wiki.mailscanner.info/posting
> >>
> >> Support MailScanner development - buy the book off the website!
> >>
> >
> >
> >--
> >MailScanner mailing list
> >mailscanner at lists.mailscanner.info
> >http://lists.mailscanner.info/mailman/listinfo/mailscanner
> >
> >Before posting, read http://wiki.mailscanner.info/posting
> >
> >Support MailScanner development - buy the book off the website!
> >
> --
> MailScanner mailing list
> mailscanner at lists.mailscanner.info
> http://lists.mailscanner.info/mailman/listinfo/mailscanner
>
> Before posting, read http://wiki.mailscanner.info/posting
>
> Support MailScanner development - buy the book off the website!
--
Cheers!
--
Richard Potter
More information about the MailScanner
mailing list