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:
Sending an email with attachment (remote file)


New User

Jan 20, 2015, 3:31 PM

Post #1 of 2 (1515 views)
Sending an email with attachment (remote file) Can't Post


I'm currently using MIME Lite to send email from a linux server. I have an attachment that is located in another server and I can access it using a url, for example If I have a perl script that sends out email from another server using MIME Lite, can I somehow add the image as an attachment using the url?

I've tried this:

attach $msg (
Type => 'application/octet-stream',
Encoding => 'base64',
Path => "",
Filename => "test.jpg"

but it doesn't work. Does anyone know a work around for this?



Veteran / Moderator

Jan 20, 2015, 4:12 PM

Post #2 of 2 (1513 views)
Re: [superman] Sending an email with attachment (remote file) [In reply to] Can't Post

Use the LWP::Simple module to download the file onto your computer and then attach it to the email.


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

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