Question

email excel sheet as attachment using Sendmail

Asked by: sreehariharan

Experts,

Am having Sendmail installed on SunOS... Am able to attach and email Plain/Text file
But when i tried to attach & send Excel sheet using my script. am receiving excel sheet. when i download and open Ooops the file is in unrecognized format.....

I tried Content-type as application/vnd.excel

{
echo To: $EMAIL_TO
echo From: $EMAIL_FROM
echo Subject: $EMAIL_SUBJECT
echo 'MIME-Version: 1.0'
echo 'Content-type: multipart/mixed; boundary="***"'
echo '--***'
echo ''
echo $EMAIL_BODY
echo '--***'
echo 'Content-Disposition: attachment; filename="'$FILE_NAME'"'
echo ''
cat $ATTACHED_FILE
echo '--***'
} | /usr/sbin/sendmail -t $EMAIL_TO

                                  
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:

Select allOpen in new window

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-02-24 at 11:44:38ID24173413
Tags

excel

,

sendmail

,

MIME

,

mail

Topics

SendMail Email Server

,

Bourne Shell (sh)

,

Shell Scripting

Participating Experts
3
Points
500
Comments
22

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. displaying sendmail version
    With what flags will sendmail do nothing but show its version number? tnhx
  2. sendmail setup
    I am trying to setup sendmail 8.8.8 on a Solaris 2.5.1 machine. I run the makesendmail script and get the following error: Configuration: os=SunOS, rel=5.5.1, rbase=5, rroot=5.5, arch=sun4, sfx= Making in obj.SunOS.5.5.1.sun4 /usr/local/gnu/bin/gcc -I. -O -I/usr/sww/include ...
  3. Stop Sendmail from relaying mail under SunOS
    Hi there, I am pretty much a Unix dummy. :) Still I "inherited" the management of our workstations. We have Sendmail 8.8.8 under SunOS 5.6 installed. Now how can I make sure, the smtp daemons on our workstations do NOT relay any mail FROM outside TO someone outsi...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: omarfaridPosted on 2009-02-24 at 12:04:09ID: 23725732

you run uuencode on the file, e.g.

uuencode myfile.xls < myfile.xls | sendmail username@domain

 

by: sreehariharanPosted on 2009-02-25 at 06:16:00ID: 23733723

Hi omarfarid,
Thanks for your Quick Reply... Here i need to specify From address also externally... will you please suggest me the step.


 

by: sreehariharanPosted on 2009-02-25 at 06:19:17ID: 23733762

Hi I tried your Solution also as

 uuencode myfile.xls < /home/user/src/myfile.xls | /usr/sbin/sendmail mymailid@gmail.com

but i received mail with junk letters

begin 644 myfile.xls
MT,\1X*&Q&N$`````````````````````.P`#`/[_"0`&```````````````!
M````````````````$```!0````$```#^____``````8```#_____________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M______________________]2`&\`;P!T`"``10!N`'0`<@!Y````````````
M````````````````````````````````````````````````%@`%`?______
M____`0````````````````````````````````````````````````````$`
M``#`!P```````%<`;P!R`&L`8@!O`&\`:P``````````````````````````
M```````````````````````````````````````2``(!________________
M`````````````````````````````````````````````````````+L'````
M````````````````````````````````````````````````````````````
M``````````````````````````````(```#_______________\`````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````@```/_______________P``````````````````
M``````````````````````````````````````````````D($```!@4`TQ#,
M!T$````&````X0`"`+`$P0`"````X@```%P`<``$``!C;&%R:69Y("`@("`@
M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
M("`@("`@0@`"`+`$80$"````/0$$`````0"<``(`#@`9``(````2``(````3
M``(```"O`0(```"\`0(````]`!(`:`$.`5PZOB,X```````!`%@"0``"````
MC0`"````(@`"````#@`"``$`MP$"````V@`"````,0`:`,@```#_?Y`!````
M````!0%!`'(`:0!A`&P`,0`:`,@```#_?Y`!````````!0%!`'(`:0!A`&P`
M,0`:`,@```#_?Y`!````````!0%!`'(`:0!A`&P`,0`:`,@```#_?Y`!````
M````!0%!`'(`:0!A`&P`'@0<``4`%P``(B0B(RPC(S!?*3M<*"(D(B,L(R,P
M7"D>!"$`!@`<```B)"(C+",C,%\I.UM2961=7"@B)"(C+",C,%PI'@0B``<`
M'0``(B0B(RPC(S`N,#!?*3M<*"(D(B,L(R,P+C`P7"D>!"<`"``B```B)"(C
M+",C,"XP,%\I.UM2961=7"@B)"(C+",C,"XP,%PI'@0W`"H`,@``7R@B)"(J
M(",L(R,P7RD[7R@B)"(J(%PH(RPC(S!<*3M?*"(D(BH@(BTB7RD[7RA`7RD>
M!"X`*0`I``!?*"H@(RPC(S!?*3M?*"H@7"@C+",C,%PI.U\H*B`B+2)?*3M?
M*$!?*1X$/P`L`#H``%\H(B0B*B`C+",C,"XP,%\I.U\H(B0B*B!<*",L(R,P
M+C`P7"D[7R@B)"(J("(M(C\_7RD[7RA`7RD>!#8`*P`Q``!?*"H@(RPC(S`N
M,#!?*3M?*"H@7"@C+",C,"XP,%PI.U\H*B`B+2(_/U\I.U\H0%\IX``4````
M``#U_R```````````````,`@X``4``$```#U_R```/0``````````,`@X``4
M``$```#U_R```/0``````````,`@X``4``(```#U_R```/0``````````,`@
MX``4``(```#U_R```/0``````````,`@X``4``````#U_R```/0`````````
M`,`@X``4``````#U_R```/0``````````,`@X``4``````#U_R```/0`````
M`````,`@X``4``````#U_R```/0``````````,`@X``4``````#U_R```/0`
M`````````,`@X``4``````#U_R```/0``````````,`@X``4``````#U_R``
M`/0``````````,`@X``4``````#U_R```/0``````````,`@X``4``````#U
M_R```/0``````````,`@X``4``````#U_R```/0``````````,`@X``4````
M```!`"```````````````,`@X``4``$`*P#U_R```/@``````````,`@X``4
M``$`*0#U_R```/@``````````,`@X``4``$`+`#U_R```/@``````````,`@
MX``4``$`*@#U_R```/@``````````,`@X``4``$`"0#U_R```/@`````````
M`,`@DP($`!"``_^3`@0`$8`&_Y,"!``2@`3_DP($`!.`!_^3`@0``(``_Y,"
M!``4@`7_8`$"````A0`3`)4%``````L`9FER<W0@<VAE972%`!0`P`8`````
M#`!S96-O;F0@<VAE972,``0``0`!`/P`&``"`````@````4``$UA;F]J!0``
M2W5M87+_``H`"`!S!0``#`````H````)"!````80`+L-S`?!````!@````T`
M`@`!``P``@!D``\``@`!`!$``@```!``"`#\J?'236)0/U\``@`!`"H``@``
M`"L``@```((``@`!`(``"````````````"4"!````/\`@0`"`,$$&P`"````
M&@`"````%````!4```"#``(```"$``(```"A`"(``0!D``$``0`!``(`+`$L
M`0```````.`_````````X#\``%4``@`(```"#@```````0```````0```/T`
M"@``````#P``````_0`*`````0`/``$````(`A````````$`_P````````$`
M`#X"$@"V!@````!````````````````=``\``P````````$`````````$@`"
M````"@````D($```!A``NPW,!\$````&````#0`"``$`#``"`&0`#P`"``$`
M$0`"````$``(`/RI\=)-8E`_7P`"``$`*@`"````*P`"````@@`"``$`@``(
M````````````)0($````_P"!``(`P00;``(````:``(````4````%0```(,`
M`@```(0``@```*$`(@`!`&0``0`!``$``@`L`2P!````````X#\```````#@
M/P``50`"``@```(.```````!```````!````/@(2`+8``````$``````````
M`````!T`#P`#`````````0`````````2``(````*````________________
M____________________________________________________________
M________________`0````(````#````!`````4````&````!P````@````)
M````"@````L````,````#0````X````/````$````!$````2````$P```!0`
M```5````%@```!<````8````&0```!H````;````'````!T````>````_O__
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M_______________________________________^____`@````,````$````
M_O____[____^________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
!____
`

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:

Select allOpen in new window

 

by: omarfaridPosted on 2009-02-25 at 10:28:08ID: 23736682

try this

uuencode myfile.xls myfile.xls | mailx -s "subject" user@domain.com

 

by: sreehariharanPosted on 2009-03-03 at 01:23:16ID: 23782107

I Tried and tired on searching with this....
This also showing some junk mails....

begin 775 workbook.xls
MT,\1X*&Q&N$`````````````````````.P`#`/[_"0`&```````````````!
M````````````````$```!0````$```#^____``````8```#_____________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M______________________]2`&\`;P!T`"``10!N`'0`<@!Y````````````
M````````````````````````````````````````````````%@`%`?______
M____`0````````````````````````````````````````````````````$`
M``#`!P```````%<`;P!R`&L`8@!O`&\`:P``````````````````````````
M```````````````````````````````````````2``(!________________
M`````````````````````````````````````````````````````+L'````
M````````````````````````````````````````````````````````````
M``````````````````````````````(```#_______________\`````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````@```/_______________P``````````````````
M``````````````````````````````````````````````D($```!@4`TQ#,
M!T$````&````X0`"`+`$P0`"````X@```%P`<``$``!C;&%R:69Y("`@("`@
M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
M("`@("`@0@`"`+`$80$"````/0$$`````0"<``(`#@`9``(````2``(````3
M``(```"O`0(```"\`0(````]`!(`:`$.`5PZOB,X```````!`%@"0``"````
MC0`"````(@`"````#@`"``$`MP$"````V@`"````,0`:`,@```#_?Y`!````
M````!0%!`'(`:0!A`&P`,0`:`,@```#_?Y`!````````!0%!`'(`:0!A`&P`
M,0`:`,@```#_?Y`!````````!0%!`'(`:0!A`&P`,0`:`,@```#_?Y`!````
M````!0%!`'(`:0!A`&P`'@0<``4`%P``(B0B(RPC(S!?*3M<*"(D(B,L(R,P
M7"D>!"$`!@`<```B)"(C+",C,%\I.UM2961=7"@B)"(C+",C,%PI'@0B``<`
M'0``(B0B(RPC(S`N,#!?*3M<*"(D(B,L(R,P+C`P7"D>!"<`"``B```B)"(C
M+",C,"XP,%\I.UM2961=7"@B)"(C+",C,"XP,%PI'@0W`"H`,@``7R@B)"(J
M(",L(R,P7RD[7R@B)"(J(%PH(RPC(S!<*3M?*"(D(BH@(BTB7RD[7RA`7RD>
M!"X`*0`I``!?*"H@(RPC(S!?*3M?*"H@7"@C+",C,%PI.U\H*B`B+2)?*3M?
M*$!?*1X$/P`L`#H``%\H(B0B*B`C+",C,"XP,%\I.U\H(B0B*B!<*",L(R,P
M+C`P7"D[7R@B)"(J("(M(C\_7RD[7RA`7RD>!#8`*P`Q``!?*"H@(RPC(S`N
M,#!?*3M?*"H@7"@C+",C,"XP,%PI.U\H*B`B+2(_/U\I.U\H0%\IX``4````
M``#U_R```````````````,`@X``4``$```#U_R```/0``````````,`@X``4
M``$```#U_R```/0``````````,`@X``4``(```#U_R```/0``````````,`@
MX``4``(```#U_R```/0``````````,`@X``4``````#U_R```/0`````````
M`,`@X``4``````#U_R```/0``````````,`@X``4``````#U_R```/0`````
M`````,`@X``4``````#U_R```/0``````````,`@X``4``````#U_R```/0`
M`````````,`@X``4``````#U_R```/0``````````,`@X``4``````#U_R``
M`/0``````````,`@X``4``````#U_R```/0``````````,`@X``4``````#U
M_R```/0``````````,`@X``4``````#U_R```/0``````````,`@X``4````
M```!`"```````````````,`@X``4``$`*P#U_R```/@``````````,`@X``4
M``$`*0#U_R```/@``````````,`@X``4``$`+`#U_R```/@``````````,`@
MX``4``$`*@#U_R```/@``````````,`@X``4``$`"0#U_R```/@`````````
M`,`@DP($`!"``_^3`@0`$8`&_Y,"!``2@`3_DP($`!.`!_^3`@0``(``_Y,"
M!``4@`7_8`$"````A0`3`)4%``````L`9FER<W0@<VAE972%`!0`P`8`````
M#`!S96-O;F0@<VAE972,``0``0`!`/P`&``"`````@````4``$UA;F]J!0``
M2W5M87+_``H`"`!S!0``#`````H````)"!````80`+L-S`?!````!@````T`
M`@`!``P``@!D``\``@`!`!$``@```!``"`#\J?'236)0/U\``@`!`"H``@``
M`"L``@```((``@`!`(``"````````````"4"!````/\`@0`"`,$$&P`"````
M&@`"````%````!4```"#``(```"$``(```"A`"(``0!D``$``0`!``(`+`$L
M`0```````.`_````````X#\``%4``@`(```"#@```````0```````0```/T`
M"@``````#P``````_0`*`````0`/``$````(`A````````$`_P````````$`
M`#X"$@"V!@````!````````````````=``\``P````````$`````````$@`"
M````"@````D($```!A``NPW,!\$````&````#0`"``$`#``"`&0`#P`"``$`
M$0`"````$``(`/RI\=)-8E`_7P`"``$`*@`"````*P`"````@@`"``$`@``(
M````````````)0($````_P"!``(`P00;``(````:``(````4````%0```(,`
M`@```(0``@```*$`(@`!`&0``0`!``$``@`L`2P!````````X#\```````#@
M/P``50`"``@```(.```````!```````!````/@(2`+8``````$``````````
M`````!T`#P`#`````````0`````````2``(````*````________________
M____________________________________________________________
M________________`0````(````#````!`````4````&````!P````@````)
M````"@````L````,````#0````X````/````$````!$````2````$P```!0`
M```5````%@```!<````8````&0```!H````;````'````!T````>````_O__
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M_______________________________________^____`@````,````$````
M_O____[____^________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
!____
`
end

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:

Select allOpen in new window

 

by: oklitPosted on 2009-03-03 at 01:49:49ID: 23782220

Can you use mutt/mail/mailx instead of sendmail?

 

by: oklitPosted on 2009-03-03 at 02:02:58ID: 23782279

Oh, I see that omarfarid already wrote about mailx. mutt would be the easiest way :)
echo "body of email" | mutt -x -a file.to.attach user@domain

 

by: omarfaridPosted on 2009-03-03 at 04:11:39ID: 23782954

oklit:

Please feel free to repeat the same recommendation since it might strength the proposed one.

 

by: sreehariharanPosted on 2009-03-03 at 19:42:03ID: 23791517

Oklit,
  Thanks for ur response and omarfarid thanks for ur support...

I tried with mutt, but it was not configured in my server.
am getting following error


ksh: mutt:  not found

                                              
1:

Select allOpen in new window

 

by: omarfaridPosted on 2009-03-03 at 21:04:37ID: 23791851

you may download and install from sunfreeware.com:\

http://sunfreeware.com/programlistsparc10.html#mutt
ftp://ftp.sunfreeware.com/pub/freeware/sparc/10/mutt-1.5.18-sol10-sparc-local.gz

The provided links are for solaris 10. Please note that you may need to install additional s/w, please see dependencies in the provided link.

Once downloaded, run

gunzip mutt-1.5.18-sol10-sparc-local.gz
pkgadd -d mutt-1.5.18-sol10-sparc-local

 

by: sreehariharanPosted on 2009-03-03 at 21:18:49ID: 23791898

Omar... But this to be on our server Machines and we dont have access to install any softwares...
do we cant send with sendmail itself by changing the option of Content-Type Encoding such things ?...

 

by: omarfaridPosted on 2009-03-03 at 21:38:20ID: 23791966

What client do you use to read received messages? mail clients like mail and mailx can not deal with attachments.

 

by: sreehariharanPosted on 2009-03-03 at 23:10:04ID: 23792266

We are not having any mail Clients.. This is the SunOS box with CLI and not a GUI. Its having Sendmail software to send mails... and not having any clients to read... Since this server machine is used to send mail only and not intend of receiving mails....

 

by: omarfaridPosted on 2009-03-03 at 23:29:03ID: 23792379

in your previous posts you showed that you are getting text and no attachments. From where you were reading this email?

 

by: sreehariharanPosted on 2009-03-04 at 04:31:22ID: 23794025

am sending it to my Gmail ID and from there am reading my mails and posting...

 

by: omarfaridPosted on 2009-03-04 at 04:38:48ID: 23794085

how the excel sheet is uploaded to solaris server? are you using ftp to upload?

 

by: sreehariharanPosted on 2009-03-04 at 05:06:25ID: 23794284

yes i ftped in binary mode...

Here i made some modification to my code
Please see the code Snippet...
am using encoding technique as X-UUencode
am able to receive my proper excel sheet in my IBM Lotus Mail Client, but not with gmail...
when i opened with gmail its showing some junk charecters...
i found that gmails and most of the mail-exchanges are using base64 type encoding....
do you know how to convert our files from binary to base64?...

#!/usr/bin/sh
 
export EMAIL_FROM=$1
export EMAIL_TO=$2
export EMAIL_SUBJECT=$3
export EMAIL_BODY=$4
export FILE_NAME=$5
export ATTACHED_FILE=$6
 
{
echo To: $EMAIL_TO
echo From: $EMAIL_FROM
echo Subject: $EMAIL_SUBJECT
echo 'MIME-Version: 1.0'
echo 'Content-type: multipart/mixed; boundary="***"'
echo ''
echo '--***'
echo 'Content-type: text/plain; charset=ISO-8859-1'
echo 'Content-Transfer-Encoding: quoted-printable'
echo ''
echo $EMAIL_BODY
echo '--***'
echo 'Content-Type: application/vnd.ms-excel; name="'$FILE_NAME'"'
echo 'Content-Transfer-Encoding: X-uuencode'
echo 'Content-Disposition: attachment; filename="'$FILE_NAME'"'
echo ''
uuencode $ATTACHED_FILE $ATTACHED_FILE
echo '--***'
} | /usr/sbin/sendmail -t $EMAIL_TO
 
echo "Mail Sent"
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:

Select allOpen in new window

 

by: omarfaridPosted on 2009-03-04 at 06:12:18ID: 23794826

uuencode has th -m option which according to man page:

"  -m              Encodes source-file  using  Base64  encoding and sends it to standard output."

I used it and sent file to gmail and faced same problem. hotmail rejected my message and could not verify, however I tried it with some other mail system and it was received properly.

 

by: sreehariharanPosted on 2009-03-04 at 07:09:11ID: 23795409

Ya same issue for me too... But my OS is HP-UX, i wrongly mentioned as SunOS...
in HP-UX it doesnt have -m option... :(

 

by: omarfaridPosted on 2009-03-04 at 07:22:52ID: 23795564

 

by: sreehariharanPosted on 2009-04-13 at 15:45:33ID: 24133518

I Checked with the same on hotmail and also on Yahoo too...
i received the same error... its not decrypting my excel sheet properly...

 

by: anand_2000vPosted on 2009-08-10 at 05:44:14ID: 25059377

send mail will not work. try

uuencode myfile.xls myfile.xls | mailx -s <Subject u wish to give >  username@domain

if mailx is not working , use mail command

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...