You received a lot of good advice at no charge.... but seem to have misunderstood or ignored most of it.
If this is merely an exercise, kudos for the improvements -- especially your decision to use a module to test addresses Note 1 -- but please don't take offense at explanations of your exercise's deficiencies. You're in the position of a small child poking a knife into an electric outlet, if you actually intend to use this "out in the wild." Rolling your own, even with the copious good advice you've received, is NOT an exercise for the beginner.
Please note that Email::Valid concerns itself chiefly with the validity of the form of the address -- testing it against RFC822 and, optionally, for a valid TLD (top level domain); for the presence of spaces and correcting them, if you specify that with fudge(); and for the existence of an MX or A record. But it's not checking subject, date or body for nasties, nor making any attempt to ensure that the mail actually originates (I'm sure there's a better term for that) at your server.
Just reading the code and pod for NMSFormMail (or, better yet, TFMail -- the .zip is available at http://nms-cgi.sourceforge.net/scripts.shtml) will illustrate some of the other aspects of making user input (somewhat) safe.
Note 1 Email::Valid's author assigns a version number of less than one -- typically, a signal that a module is a work-in-progress rather than something believed complete and stable.
In reply to Re: Is that a decent concept?
by ww
in thread Is that a decent concept?
by heatblazer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |