Hi,
I do program
Perl, but I am not going to write a script for you.
If someone writes a script for you, then you dont learn anything, and where is the fun in that? :)
I suggest you read about the
MIME::Lite module which does everything I think you are asking for.
See the documentation for examples.
I notice this is your first post (with this username anyway), have a read at the
PerlMonks FAQ and
How do I post a question effectively?.
Hope this helps.
Martin