Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: email attachments using multipart MIME format

by demerphq (Chancellor)
on Sep 22, 2003 at 18:39 UTC ( [id://293227]=note: print w/replies, xml ) Need Help??


in reply to email attachments using multipart MIME format

You arent passing parameters around so its hard to see the actual code flow. Im betting its because $tmp2 isnt assigned a variable when &email is called. (Although the error message is on the face of it a bit confusing.) Ill look at making MIME::Lite a little more intelligent in this regard. But you might consider turning on strict and warnings. By the time you have cleaned up your code enough to make Perl stop whining I suspect this matter will be resolved. :-)


---
demerphq

Everybody remember the Gandhi quote?

    First they ignore you, then they laugh at you, then they fight you, then you win.

Gentlemen and ladies, this newest leaked memo from Microsoft confirms that we are advancing through GandhiCon Three.


Replies are listed 'Best First'.
Re: Re: email attachments using multipart MIME format
by waiterm (Acolyte) on Sep 24, 2003 at 22:35 UTC
    I've managed to fix the problem, basically my checks to see whether the files existed weren't working properly, I've changed it to a simpler
    if (-e $tmp) { $picfilename = "".$AGENT."-".$AGENTid.".jpg"; print ("$pic +filename\n"); $msg->attach( Type => 'image file/jpg', Path => $tmp, Filename => $picfilename, Disposition => 'attachment'); }
    I've also altered where it creates the extra parts to the e-mail, so for each property it creates an e-mail, adds each part in the loop if the file exists and then sends the e-mail. Thanks very much for your help, I'm glad I managed to find the monks, especially after the amount of times I've been getting stuck in my learning recently!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://293227]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2024-04-25 22:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found