in reply to Re^4: How do I get Windmail to send an email attachment
in thread How do I get Windmail to send an email attachment

Does -f $Form{attachment} return a true value?

Also, you are aware that your form may be used to send spam, not only to your company but also to any other address, by (for example) setting the subject to "Hi!\nTo: somewhere@example.com"?

Replies are listed 'Best First'.
Re^6: How do I get Windmail to send an email attachment
by kjg (Sexton) on Apr 04, 2008 at 14:42 UTC
    This is what $Form{attachment} outputs: 'T:\Perlcgi\Brief\admin.htm' And yes I am aware. It's not a public webserver, so I'm not worried about that!

    Ah, windmail logs - OK I'll ask the techies here to look in them for me!!
    Never knowingly obfuscated

      You haven't told us whether a file actually exists at the location that $Form{attachment} outputs. The -f test checks for that. As T: sounds like a (remote) network drive, it could also be that the webserver user (and thus, likely the Windmail user) don't have access to that network resource. A second test from within Perl could confirm that, as could obtaining the Windmail logs.

      Of course, you can still simply copy MIME::Lite into your script, no matter how much reluctance you show.

        Ah I see, oh yes it definitely exists, I'm actually browsing to it in the Web form, but I've also tried hardcoding a file name into the script rather than using $attachment and I still have the same problem (and the hardcoded file name was in the same folder on the same drive as the script)

        MIME::Lite won't work - it's not a module that my Perl installation has ;-(
        Never knowingly obfuscated