1818024 Members
2841 Online
109588 Solutions
New Discussion юеВ

attach files in sendmail

 
SOLVED
Go to solution
Carme Torca
Super Advisor

attach files in sendmail

Hi,

I want to attach one file in one mail using sendmail. Does anyone could I do this??

Thanks very much!!,
Carmen.
Users are not too bad ;-)
3 REPLIES 3
Peter Godron
Honored Contributor

Re: attach files in sendmail

Carmen,
this works on our current platform.
Perhaps not the shortest method, but the code is easy to understand, even for me!
Pete
Ralph Grothe
Honored Contributor

Re: attach files in sendmail

It's not your sendmail MTA that needs special configuration.
You rather need a MUA that's capable of creating appropriate MIME multipart headers and encoding your attachments properly (usually Base64).
You can do it either the die-hard way like Peter showed you by forming your own headers and data.
Easier yet, install a MUA like mutt
http://www.mutt.org/
or pine
http://www.washington.edu/pine/

If you are into Perl you could also use the MIME::Lite module

http://search.cpan.org/~yves/MIME-Lite-3.01/lib/MIME/Lite.pm

For mor involved stuff (like parsing etc.) you could use MIME::Tools

http://search.cpan.org/~dskoll/MIME-tools-5.416/lib/MIME/Tools.pm
Madness, thy name is system administration
Pete Randall
Outstanding Contributor
Solution

Re: attach files in sendmail

Carmen,

Here are several threads which deal with sendmail and attachments:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=33794
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=482848
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=94905
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=188903

Hopefully one of those should point you in the right direction. If not, use the search function at the top of the page and search on "sendmail attachment".


Pete

Pete