narainhere has asked for the wisdom of the Perl Monks concerning the following question:

hie Monk's!!!

Sometime back I was having a head block with a module Mail::SendMail(read it again, not Mail::Sendmail) found here. Please read this node for more info. .As expected I was able to solve it after some hours of slogging (and with some inputs from monk's ,of course).
I will illustrate the problem and solution over here,

Problem

$$ The latest version of the module 2.09 supports MIME format(which means we can send attachments)

$$ I had a script which uses this module to mail Attachments, but the mail body default's to text/plain if we have any attachments.I was to mail a html body.So the mail was ugly with all the HTML tags.

$$ The content type you specify with setMailHeader() won't have any effect if we have attachments.

Solution

$$ One is to hard-code the content type as "text/html" @line 506.

$$ Two you can add a switch option in command line to specify the content-type for the mail body and depending on the switch you can set the content-type.


Hope this little piece of information helps.

The world is so big for any individual to conquer