Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

RE: mailtosql.pl

by le (Friar)
on Jul 21, 2000 at 12:31 UTC ( [id://23568]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to mailtosql.pl

Sorry I had to vote -- on this one. The mail-to-database problem is one I had to fiddle with two months ago.
  1. Your script doesn't do anything with attachments, they will just be saved encoded into the body text column.
  2. Usually you know into which database you want to insert mail, so dynamically selecting it isn't necessary.
  3. Passing passwords on the command line isn't a good idea, they can be found in the shell's history (if it has one).
  4. Traversing over the header in a while loop should be faster than mapping (but this is untested).
  5. I prefer using placeholders to insert values, so I don't have to fiddle with correct quoting.
These are just my 2 cents.

Replies are listed 'Best First'.
RE: RE: mailtosql.pl
by lindex (Friar) on Jul 21, 2000 at 19:15 UTC
    1. Hmm forgot to handle attachments, Ill take care of that later today
    2. dynamiclly selecting isnt hurting anything :)
    3. Its not really meant to be used from command line, its more meant to
    be used from procmail or aliases etc etc.
    4. I think map is nifty :P~
    5. Iam weird.
    6. Thanks for the input :)



    lindex
    /****************************/ jason@gost.net, wh@ckz.org http://jason.gost.net /*****************************/
      If you need a script that can parse emails and put it into a database (with all attachments and stuff), email me. (Or should I put it here??)
        Why not?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://23568]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.