Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What's wrong with my sendmail code?

Status
Not open for further replies.

volcano

Programmer
Aug 29, 2000
136
HK
Hello, I have written a shell script used to send a PDF to myself. I can receive the attachment, but I can't open it. I have tried the MIME-type "application/pdf" but still failed. Do you have any idea of why it's like that? Thanks so much

-----

#!/bin/sh
{
echo From: test@test.com
echo To: myself@test.com
echo Subject: testing
echo 'MIME-Version: 1.0'
echo 'Content-type: application/acrobat; name="test.pdf"'
echo ''
echo ''
echo testing boby message
echo ''
echo 'Content-Disposition: attachment; filename=test.pdf'
echo ''
cat /test/test.pdf
} | /usr/lib/sendmail myself@test.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top