in reply to passing a hash to Mime::Lite and thence to SendMail
Following up slightly on samtregar's post: in the "I think the trouble starts here:" section not only is the syntax complete bollix, but you're not using the parameter that is passed in any case, you are using a global variable!
In the "with the overnight attempts to educate me" section you get a little closer (probably by copying sample code from my scratch pad), but have mutilated the code so that you are still using a global. You should almost never need to use local, it doesn't do what you think! Use my for declaring variables. Do not use use vars qw (...);, it doesn't do what you think!
Your main problem is that "Data" is where your email message text goes - the thing that the error message claims is missing. Search the MIME::Lite documentation, you will not find a single place where body is used to set the message data.
|
|---|