Skip Menu |

This queue is for tickets about the Mail-Bulkmail CPAN distribution.

Report information
The Basics
Id: 2806
Status: resolved
Priority: 0/
Queue: Mail-Bulkmail

People
Owner: Nobody in particular
Requestors: clint [...] drtech.co.uk
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: Message path ignored if Message passed in constructor
If you create a new Mail::Bulkmail object with the parameter 'Message'=>'/path/to/message', Bulkmail ignores this stored path when trying to generate the message with buildMessage. Secondly, because no path is found the arguments, $file is set to undef, so when running with warnings turned on, the error message "Could not open file..." is not returned because Bulkmail barfs on the undefined file argument. The Message method expects the path the be passed in as an argument, so the only way to set the message is by using $bulk->Message('/path/to/message/); I have added a statement which looks first in the argument list, then tries the _Message method, and if still not found, sets $file to an empty string.
Download patch
application/octet-stream 653b

Message body not shown because it is not plain text.

From: Neil Overmon novermon [...] zaplet.com
Dear Sir, This fix didn't work for me. Specifying the file still led to an error, although print $bulk->Message() works fine, provided I set _Message and not Message on the object. In the interest of time for my project, I have hardcoded $file in Bulkmail.pm. Thanks for pursuing this- if I get a chance for a full debug I will follow-up. Neil novermon@zaplet.com [guest - Mon Jun 16 10:19:19 2003]: Show quoted text
> If you create a new Mail::Bulkmail object with the parameter > 'Message'=>'/path/to/message', Bulkmail ignores this stored path > when trying to generate the message with buildMessage. > > Secondly, because no path is found the arguments, $file is set to > undef, so when running with warnings turned on, the error message > "Could not open file..." is not returned because Bulkmail barfs on > the undefined file argument. > > The Message method expects the path the be passed in as an argument, > so the only way to set the message is by using $bulk-
> >Message('/path/to/message/);
> > I have added a statement which looks first in the argument list, then > tries the _Message method, and if still not found, sets $file to > an empty string.
From: Neil Overmon novermon [...] zaplet.com
Dear Sir, This fix didn't work for me. Specifying the file still led to an error, although print $bulk->Message() works fine, provided I set _Message and not Message on the object. In the interest of time for my project, I have hardcoded $file in Bulkmail.pm. Thanks for pursuing this- if I get a chance for a full debug I will follow-up. Neil novermon@zaplet.com [guest - Mon Jun 16 10:19:19 2003]: Show quoted text
> If you create a new Mail::Bulkmail object with the parameter > 'Message'=>'/path/to/message', Bulkmail ignores this stored path > when trying to generate the message with buildMessage. > > Secondly, because no path is found the arguments, $file is set to > undef, so when running with warnings turned on, the error message > "Could not open file..." is not returned because Bulkmail barfs on > the undefined file argument. > > The Message method expects the path the be passed in as an argument, > so the only way to set the message is by using $bulk-
> >Message('/path/to/message/);
> > I have added a statement which looks first in the argument list, then > tries the _Message method, and if still not found, sets $file to > an empty string.