in reply to bad email code?
As already suggested, there is a good selection of modules on CPAN for handling email.
You should consider limiting access to the script and, if possible, the potential recipients of the emails that this script can send email to - especially if it's publically accessable.
If your script takes arguments for the recipient and the message content, and doesn't do any sort of checking, it could be used to spam people - and it would all appear to come from your email account.
If you plan on using the script to allow people to email you from your website for example, hardcode your email address as the recipient in the script - there's no need for the script to send to anyone else.
As far as I'm concerned, this is one time where flexibility shouldn't be at the top of your list.
Figure out exactly what the script has to do, and ensure it can do no more.
Hope that helps,
Baz.
|
|---|