There has to be something wrong with your variable $text_mail. Is the attach method you showed in your original post called in the sub sendMail? Or somewhere outside? It could be a scoping issue.
Please insert the following in your program just before the attach and provide the result:
use Data::Dumper; print Dumper(\$text_mail); $msg->attach( ...
This will show exactly what is in $text_mail at the moment you call attach (it will even show hidden control characters should there be any)
In reply to Re^5: Mime::lite "no data" error again
by jethro
in thread Mime::lite "no data" error again
by Psychodead
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |