I need to sent a file via mailx or mail, but I wat to sent it as attachment not in the body message. Is there any way how to do it ? Eventually is there any other tool in solaris which can be used for such as procedure ? Thanks
相关问题
- How to add sender name before sender address in py
- Android: Using Intent to send email - only offerin
- Verify if an email address exists or not
- How can I add condition on mail notification larav
- My email signature will not appear when generating
相关文章
- How do I make a forward e-mail link?
- Debug HTML Email in Gmail App
- Sending email using php, gmail, and swiftmailer ca
- Android - getting an error “no application can per
- How can the Return-Path header be different than t
- Regex Email - Ignore leading and trailing spaces?
- Sending mail with ASP.Net vNext
- TFS email notification
Regarding mailx, you can find some inspiration here http://www.shelldorado.com/articles/mailattachments.html
I would recommend you to have a look at mutt http://www.mutt.org/
If your
mailx
doesn't support the-a
option and you don't have access tomutt
, and you don't want to turn touuencode
as a fallback from the 1980s, as a last resort you can piece together a small MIME wrapper yourself.The path to
sendmail
is often system-dependent. Try/usr/sbin/sendmail
or/usr/lib/sendmail
or ... a myriad other weird places if it's not in yourPATH
.This is quick and dirty; for proper MIME compliance, you should do RFC2047 encoding of the subject if necessary, etc, and see also the notes in the comments in the code. But for your average US-centric 7-bit English-language cron job, it will do just fine.
You can attach files to mailx using -a like so
so long as your in the same directory as your attachment that should work fine. If not you can just state the directory like `
Try using this command in order to send an attachment using Mailx:
I'd recommend using
mutt
for it, which is light-weight enough to quickly install on any system.