If you have the .pm file for mime type checking (for example like Lite.pm for mime::lite)
you do not necessarily have to "install" the module. Just put it in your directory on the machine you are using, say /home/Rhije/Lite.pm
and add this to the shebang in the top of your own perl code
This may not always work, but mime content-type checking is reasonably complex, so it is definitely worth a try. Rather than rolling your own. You can pack the two files in a tarball, extract them and run the perl. I know it violates your "one file" request.
Hello,
I am trying to send a gzip file on email using below command but the zipped file received on email is corrupt.
mailsend -smtp $smtpip -content-type 'application/x-gzip' -mime-type "application/x-gzip" -t $receiver -f $sender -sub "$subject" -M "$MSG" -attach $file
file name is ... (1 Reply)
I've spent a good two weeks on trying to figure out a proper way to get the mime type of a file. The "file" command on the Sparc machine I'm working on is an older version and does not support the --mime flag. It outputs things like:
somefile.pdf: Adobe Portable Document Format (PDF) v1.5
... (3 Replies)
Hi All..
I have a Filename as
FAB1_600015_CONRAD.A0_7XYZ12345.000_LT-SWET.01_LTPA25L_20110622-161429_07_WFR12345_20110622-161429_20110712-125228.data.dis
I want to get the result as... (5 Replies)
Hello.
I need to send mails from hp-ux with 2 attachments: a text file and an excel file. So I'm composing a mime file which I will pipe to sendmail utility.
This works fine if the only attachment is the text file (i use cat command to attach text content). But I have problems with the format... (3 Replies)
Hello
I need to retrieve the content of a file in the shell script file(.sh file).
I store the Process ID of the a process in file.Only the PID is available in that file.
Inside the shell script i want to retireve the content(PID) and need to check for the existence of the Process.Basically... (5 Replies)
Using Lynx, when I try to download a .rar, it confirms I want to download and its got it as an appication/rar file.
However, split archives that end in .r## (.r00, .r01 ...) are not recognized as an appication/rar file and it reads the file like a .txt or .html.
How can I fix this?
Thanks! (2 Replies)
I have a problem while sending attachement , it is displying Content into body of mail (Junk Data) instead of attachment (zip format) in Linux, same code is working in Sun Solaris..
I have read query in this site , need to set MIME type to mailx componment. Please help me how to set MIME type..... (1 Reply)