Subject: | tmpnam broken under Windows |
Mail::Message creates a temporary filename for building a message
(possibly only under some circumstances), and currently uses tmpnam()
for that purpose (see lib/Mail/Message/Body/File.pm).
Unfortunately, tmpnam() is broken under Windows. It tries to create the
file in the root of the current drive, a place for which the user may
not (and, in fact, probably should not) have write permission. Under
WinXP, for example, it seems to come up with filenames like '\s4e8.'.
See Microsoft's tmpnam() documentation at
http://msdn.microsoft.com/en-us/library/hs3e7355.aspx, but it's only
going to confuse you. I also note that the perl tmpnam docs say:
"For security reasons, which are probably detailed in your system's
documentation for the C library tmpnam() function, this interface should
not be used; instead see File::Temp." (http://perldoc.perl.org/POSIX.html).
File::Temp seems to work fine; can you consider switching to that?
(I could probably produce a patch if you think it would help).
Result of 'perl -v':
This is perl, v5.8.8 built for MSWin32-x86-multi-thread
(with 18 registered patches, see perl -V for more detail)
Copyright 1987-2007, Larry Wall
Binary build 822 [280952] provided by ActiveState http://www.ActiveState.com
Built Jul 31 2007 19:34:48