Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: Mail Attachment.

by barrd (Canon)
on Dec 15, 2003 at 17:56 UTC ( [id://314866] : note . print w/replies, xml ) Need Help??

in reply to Mail Attachment.

"my_message" is never get printed...
Nor in its current state would you expect it to, why have you put it in an array? Change it to a string like so:
... $my_message = 'Hello world Look at my attachment'; $msg = MIME::Entity->build(From => '', Type => "multipart/mixed", To => '', Subject => "Hello, ! ", Data => $my_message);
There, that should've worked.

It gives some bogus cannot access/read-only file error messages...
Adding the actual error message might have helped but as a quick guess I'd say check the documentation for the attach() paramater: Encoding. That's probably the cause?