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

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
sendmail pdf file

 



jake
Deleted

Apr 17, 2000, 3:51 AM

Post #1 of 2 (480 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


Cure
User

Apr 18, 2000, 8:19 PM

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

  #!/usr/bin/perl
use MIME::Lite;

# Create a new message:
$msg = new MIME::Lite
From =>'me@myhost.com',
To =>'you@yourhost.com',
Cc =>'some@other.com, some@more.com',
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"):
$msg->send;




Cure

[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