changing it to "text/plain" resolved the issue.
is there any way perl can interpret the format automatically if the file is a plain or html, because my case is the body file may be a plain or html file. so really need a way to identify the format and use plain or html accordingly. Any Ideas?
Re^2: MIME Lite no line feed in Message body
"so really need a way to identify the format and use plain or html accordingly."
If you're sending it, you should know what the content is. So, no, you don't "really need" some external evaluation of the file type... unless you're being paid to send spam without reviewing the content :-)
That said, you might also consider a file test construct like:
But - - IMO - - it's "the long way around Robin Hood's barn" to code up file-type-test procedures and translate their output to something you can stick into $mime_msg->attach(Type => '.... unless you have some need to send files whose type is not readily discernable by inspection... or such a volume to send that inspection is impractical.
PS, just in case: the idiom marked with quotes in the previous para translates (roughly) to "the hard way" or "a poor way."
Thing is i am writing a generic script which can accpet n number of attachements(plain/html/pdf/csv -- here i need to find out the attachment type programatically). the first attachement should go as the email body content(can be plain/html) and the rest of the attachemnts as attached to email. Able to attach any number of attachements. but failing to attach the first one inside the body of the email( is also going as external attachment).