Hi Sukanya
First of all, I'd suggest you go for Stefan's latest blog on this which do not use Mail Package since Mail Package is deprecated.
Create email with body and attachments for binary payload with Java mapping
After that, try testing again. If you still get any error, I'd suggest you provide the output of the Java mapping as well as a screenshot of the error.
Rgds
Eng Swee