Sponsored Content
Top Forums UNIX for Beginners Questions & Answers MIME type for sending gzip file as attachment in email Post 303002310 by tushar.modgil on Tuesday 22nd of August 2017 05:28:50 AM
Old 08-22-2017
MIME type for sending gzip file as attachment in email

Hello,

I am trying to send a gzip file on email using below command but the zipped file received on email is corrupt.


Code:
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 Report.csv.gz


Output status is below as seen in Jenkins

Code:
Mime type: application/x-gzip
Disposition: inline
Encoding type: none

Finished: SUCCESS

Please help to correct the above code.

Last edited by rbatte1; 08-22-2017 at 07:21 AM.. Reason: Converted bold to CODE tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sending an attachment through email

As a part of requirement I need to send out mails with attachment from UNIX. I have to take query the Oracle DB and send the result of the query in an attachment through mail. I use the following script for the same. #!/bin/csh #!/bin/bash #!/bin/ksh ATTFILE=/folder1/test.xls cd... (1 Reply)
Discussion started by: Sgiri1
1 Replies

2. Shell Programming and Scripting

Sending Email with Attachment

Hi, I want to send an email with multiple attachment using uuencode and mail command. I am able to send with one attachment Ex:uuencode abc.txt abc.txt | mail test@test.com -s "Test3" Can anyone reply with syntax. Regards BS (3 Replies)
Discussion started by: balajiora
3 Replies

3. Shell Programming and Scripting

Sending Attachment using MIME::Lite and Net::SMTP

Hello, I'm a newbie perl scriptor and i'm trying to figure out why i can't send an email using MIME::Lite with Net::SMTP. I keep receiving the following error: SMTP MAIL command failed: 5.7.1 Helo invalid . at attach1.pl line 31 The error keeps coming from the very last line... (2 Replies)
Discussion started by: xmaverick
2 Replies

4. Shell Programming and Scripting

Sending email and attachment file using Perl

I am trying to send an email body of information and also attachment using perl script, but I am only able to send the body but not an attachment. is there around it without using "use MIME::Lite;" module. $user = "bataf\@xyz.com"; $subjectt = "mail from perl"; open(MAIL, "| mailx -s... (1 Reply)
Discussion started by: bataf
1 Replies

5. Shell Programming and Scripting

Sending Attachment using MIME in UNIX

Hi, I am using the below code for sending attachment in UNIX but only blank attachment is coming in email even the content is not coming. Please help!!! export CONTENT="${DIR}/${RUN_DATE}_mailbody.txt" export SUBJECT="Search Result for Pattern - ${1}" export ATTACH=${2} ( echo... (9 Replies)
Discussion started by: rajesshh
9 Replies

6. Shell Programming and Scripting

sending an email with attachment

Hi, Please help me in sending an e-mail with attachment through unix mailx command is not present in our unix box. (4 Replies)
Discussion started by: dudd9
4 Replies

7. Shell Programming and Scripting

uuencode to MIME email attachment converter?

Hello all, we have an IMAP email system here that basically uses email as the transport for a transaction processing system. Users submit their transaction via an email, and our in-house application pulls the emails from the IMAP server and processes the transaction. Our problem is that we have... (0 Replies)
Discussion started by: lupin..the..3rd
0 Replies

8. Shell Programming and Scripting

Sending a file as an attachment to email

The file is located under appl/batchdata/ file name: storesales.txt I am using following code because uuencode is not present. I am not getting the data in file but i am getting the blank file with same name as an email attachment. ( echo "from: sch@xxxx.com" echo "to:sch@xxxx.com" echo... (2 Replies)
Discussion started by: skatpally
2 Replies

9. Shell Programming and Scripting

Sending an Email using MIME protocol

Hi All, I just need to send an email using MIME protocol from perl script. The data of an email should be a HTML table(contains some datas). I just tried to send a normal text which is working fine whereas if i insert HTML tags i am getting errors. I just tried like below $mail_host =... (3 Replies)
Discussion started by: prasanna2166
3 Replies

10. Shell Programming and Scripting

Help needed for sending email attachment

Hi Please help me how to send email attchment from linux server to outlook id I dont have uuencode or mutt installed on my machine and below is my uname -a output: Linux xxxxxxx 2.6.18-308.4.1.el5 #1 SMP Wed Mar 28 01:54:56 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux (7 Replies)
Discussion started by: buzzme
7 Replies
GZFORCE(1)						      General Commands Manual							GZFORCE(1)

NAME
gzforce - force a '.gz' extension on all gzip files SYNOPSIS
gzforce [ name ... ] DESCRIPTION
gzforce forces a .gz extension on all gzip files so that gzip will not compress them twice. This can be useful for files with names trun- cated after a file transfer. On systems with a 14 char limitation on file names, the original name is truncated to make room for the .gz suffix. For example, 12345678901234 is renamed to 12345678901.gz. A file name such as foo.tgz is left intact. SEE ALSO
gzip(1), gznew(1), gzmore(1), gzgrep(1), gzdiff(1), gzexe(1) ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWgzip | +--------------------+-----------------+ |Interface Stability | External | +--------------------+-----------------+ NOTES
Source for gzip is available in the SUNWgzipS package. GZFORCE(1)
All times are GMT -4. The time now is 02:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy