Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: Re: Using MIME-Lite to send attachment

by tachyon (Chancellor)
on Apr 03, 2004 at 00:05 UTC ( [id://342191]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Using MIME-Lite to send attachment
in thread Using MIME-Lite to send attachment

Ah blind. Your view of the site will therefore be far different to what I and most others see. I have but the vaguest understanding of how potentially confusing a framed site must be.

On the practical side I would suggest you perhaps include that somewhat relevant fact in your signature. The reason is not to evoke sympathy but simply to make the monks aware that what seems like a simple task available using tried and true RTFM techniques is not as easy for some people as others.

You can make the site considerably more 'reader' friendly by simplifying it. By simplify I mean get rid of the frames. To do this go to your home node. If you have not been to your home node before all you need to do is click on your login handle or search for it.

Now at the 'bottom' of what is the main content you will find a link with text User Settings. The link appears in the form 'Change your *user settings*'. Click on that link. On the page that renders you will have near the 'top' a link 'To configure your nodelets, see *Nodelet Settings*'. Nodelet Settings is the link text. Click on that link. Now select 'all nodelets off' checkbox and submit.

All frames except the iframe that contains the banner ad for the site will now be gone. The only thing you may miss is the chatterbox and messages back to you. There are stand alone clients for that part anyway.

So welcome to the Monestary. I hope that makes it a little easier for you to find your way around.

PS: Should you choose to add a signature you will find a text box on the user settings page as well. It is called 'setsignature'.

PPS: Perlmonks is in a way unique in that a significant number of the users hack code for the site. If there are things that you can see here for which the sighted are blind they would make for interesting meditations and perhaps lead to the site becoming more friendly to the visually impaired. If you are partially sighted as opposed to completely blind you also have the ability using stylesheets to dramatically change the way the site renders. As always YMMV.

cheers

tachyon

Replies are listed 'Best First'.
Re: Re: Re: Re: Using MIME-Lite to send attachment
by rscott212 (Sexton) on Apr 10, 2004 at 11:36 UTC
    Thank you for those suggestions. It works a little better without all those frames, but I'm still not getting all the text read. Oh well.

    Another quick question. I think I've got the code about right, but now I'm getting the error message below. Any ideas?

    C:\A\backup\scripts>mail_attach2.pl Bareword found where operator expected at C:\A\backup\scripts\mail_attach2.pl line 19, near "Filename =>'butterf +ly" (Might be a runaway multi-line '' string starting on line 18) (Do you need to predeclare Filename?) syntax error at C:\A\backup\scripts\mail_attach2.pl line 19, near "Fil +ename =>'butterfly" Bad name after ani' at C:\A\backup\scripts\mail_attach2.pl line 19.
    Again, here is my code:
    use MIME::Lite; ### Create a new multipart message: $msg = MIME::Lite->new( From =>'johns@mindspring.com', To =>'peter21458@aol.com', #Cc =>'some@other.com, some@more.com', Subject =>'A test with attachment', Type =>'multipart/mixed' ); ### Add parts (each "attach" has same arguments as "new"): $msg->attach(Type =>'TEXT', Data =>"Here's the file you wanted" ); $msg->attach(Type =>'animated cursor', Path =>'C:\a\cursors\', Filename =>'butterfly.ani' ); if ($I_DONT_HAVE_SENDMAIL) { MIME::Lite->send('smtp', "smtp.mailrelay.usps.gov", Timeout=>60) +; } $msg->send; ### will now use Net::SMTP as shown above #$text = $msg->as_string;
    Thanks for all your help!

    Rob

      The error message actually pinpoints it for you. Problem on line 19.....Might be runaway line near '' on line >>>18<<<. The problem is that the \ char ESCAPES other characters so if you want a LITERAL \ you need to type \\ Note that single quotes and backslashes may cause you confusion. See fix below:

      # ***** This is the problem ***** # Path =>'C:\a\cursors\', # ***** This works, note \\ and double quotes " ***** Path => "C:\\a\\cursors\\",

      Note that \\ in Win32 is a pain. Unless you are executing stuff through the shell using backtics or system you can just use / ie open FILE, "C:/WINNT/system32/some.file" works just fine.

      With the error messages they look complex but the problem is usually trivial. Missing ; Forgetting to close quotes (or stating with " and ending with ' or vice versa) and missing braces { } are the most common culprits.

      cheers

      tachyon

        Hello. I have one more question. Thanks for all your help so far! I'm still having problems with this script. I think I have it all working except that I now get the error message:
        Can't call method "attach" without a package or object reference
        Can you tell me what this means?

        Rob

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-03-28 14:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found