CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
sendmail pdf file



Apr 17, 2000, 3:51 AM

Post #1 of 2 (977 views)
sendmail pdf file Can't Post

I am a newbie with perl 5.19 running on NT. In response to a web form, I can attach a txt file to an email. however, a pdf doesn't work. It arrives corrupted.
I am using Matt's script called formhandler which shows sending pdf as an example.
Is the problem with file formats that may have changed since the script was written? The form field value is mime: /path/path/filename.pdf


Apr 18, 2000, 8:19 PM

Post #2 of 2 (977 views)
Re: sendmail pdf file [In reply to] Can't Post

use MIME::Lite;

# Create a new message:
$msg = new MIME::Lite
From =>'',
To =>'',
Cc =>',',
Subject =>'A message with 2 parts...',
Type =>'TEXT',

attach $msg
Type =>'TEXT',
Path =>'hi.pdf',
Filename =>'hi.pdf';

Send a message:

# Send in the "best" way (the default is to use "sendmail"):


[This message has been edited by Cure (edited 04-18-2000).]


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives