On Mar 4, 2004, at 4:17 PM, John Delacour wrote:

the SendMail.pm I do use, and which I presumed was the commonly used one, is that from

It's not on CPAN, and not mentioned in any of the faqs or docs I'm aware of. I think it'd be a bit of a stretch to assume it's in widespread use.


At any rate, the OP is almost certainly using Mail::Sendmail. He's calling a non-oop sendmail() function, passing it a %mail hash, and checking for an error in $Mail::Sendmail::error - it's more or less straight out of the Mail::Sendmail docs.

If he really is trying to use a Mail::Sendmail that's been drag-n-drop copied instead of correctly installed, he'll see *exactly* the problem he's mentioning. The rough equivalent to "use Sendmail;" is this:

BEGIN {
        require "Sendmail.pm";
        Sendmail::import();
}

If he mistakenly drag-n-dropped the Sendmail.pm file into the wrong folder, and then tried to compensate for that by adjusting the use statement, he'll get exactly the error he's reported. The use will find the file and require() it, but because the code in the file is actually in the Mail::Sendmail package, the call to Sendmail::import() fails, so sendmail() isn't imported into main.

Another reason I believe it's a drag-n-drop error is that, just last week, the same person had the same problem, although with different symptoms - he had drag-n-dropped a .pm file for a module that has some compiled C functions, and was wondering why he was getting errors about the .dylib not being found.

sherm--



Reply via email to