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: Intermediate:
Sending Attachments with sendmail

 



keith73
Novice

Jun 28, 2000, 12:16 PM

Post #1 of 3 (610 views)
Sending Attachments with sendmail Can't Post

 
Trying to write a script where the viewer uploads a file to the server, then that file is sent via email as an attachment.

However, I can't figure out how to send it as an attachment.

Here is what I have when writing the email:

open(MAIL,"|$MailProgram -t");
print MAIL "To: $Receiver\n";
print MAIL "From: $SenderEmail\n";
print MAIL "Subject: $Subject\n";
print MAIL "Attachments: $File\n";
print MAIL "The following was submitted by $SenderName\n\n";
close(MAIL);

Note the line print MAIL "Attachments:..."
That is where the problem is. I did a man on sendmail but either missed the answer or it wasn't there.
Any help would be appreciated.

- keith


Jasmine
Administrator

Jun 29, 2000, 3:50 AM

Post #2 of 3 (610 views)
Re: Sending Attachments with sendmail [In reply to] Can't Post

You can include attachments by using the MIME::Lite module in your program. This module is freely available at CPAN -- http://theoryx5.uwinnipeg.ca/CPAN/data/MIME-Lite/MIME/Lite.html

Good luck!


keith73
Novice

Jul 5, 2000, 6:18 AM

Post #3 of 3 (610 views)
Re: Sending Attachments with sendmail [In reply to] Can't Post

Thanks for the reply.
I have a question though...
By telling me to use MIME-Lite are you telling me also that it is NOT possible to include attachments with the way I was doing it?

The Only reason I ask is that I am trying to use MIME-Lite and am having problems, but I'll post that in another message.

- keith

 
 


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

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