473,795 Members | 3,393 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mail::Bulkmail - Can't call method "_not_worthless " on unblessed reference at


Ok... I know there is got to be something simple that I forgot, but I for the life of me can't find it. Please, for the sake of the wall I keep slamming my head into, any insight would be helpful.

Every time I try and run my script I get: Can't call method "_not_worthless " on unblessed reference at /usr/lib/perl5/site_perl/5.8.0/Mail/Bulkmail.pm line 1700, <CONF> line 9

It's a pretty straight forward script (or so I'm thinking)

#!/usr/bin/perl

# Perl Script to handle mailing.
# This replaces the WAY TOO vulnerable majordomo system we were using.

use strict;
use DBI();
use Mail::Bulkmail;
use Mail::Bulkmail: :Server;

# Die if we don't have the right number of parameters.
die ("Usage: ./mailbot.pl uid mailoutid\n") if ($#ARGV != 1);
my $uid = $ARGV[0];
my $moid = $ARGV[1];

# Setup the database.
my $dbh = DBI->connect("DBI:m ysql:database=x :host=localhost ","x","x");
my $sth = $dbh->prepare("SELEC T * FROM newemails WHERE uid=$uid AND active=1");
$sth->execute();
# Migrate all that returns to an array for processing.
my @maillist = [];

while (my $ref = $sth->fetchrow_hashr ef()) {
push(@maillist, $ref->{'address'}) ;
}

for ($a = 0; $a < @maillist; $a++) {
print("$maillis t[$a]\n");
}
# Setting up the mail
my $server = Mail::Bulkmail: :Server->new(
'Smtp' => '127.0.0.1',
'Port' => 25
) || die Mail::Bulkmail: :Server->error();

my $bulk = Mail::Bulkmail->new() || die Mail::Bulkmail->error();
$bulk->From("myaddres s\@somewhere.co m");
$bulk->Sender("myaddr ess\@somewhere. com");
$bulk->ReplyTo("myadd ress\@somewhere .com");
$bulk->Subject("Test" );
$bulk->Message("Ooooo !");
$bulk->use_envelope(0 );
$bulk->Trusting(1);
$bulk->servers([\$server]);
$bulk->LIST(@maillist );

$bulk->bulkmail() || die $bulk->error;

$sth->finish();
$dbh->disconnect() ;
Jul 19 '05 #1
1 7267
> $bulk->servers([\$server]);

That's a bug in the documentation, it'll be fixed in the next release.
Don't hand in refs to the server objects.

$bulk->servers([$server]);

Incidentally, the preferred method is to specify the server information
in the conf file by having it point to a server_file. Much easier to
configure that way.

And, finally, I respond quicker to emails than newsgroup postings, as a
general rule, in case there are any future issues. :)

-Jim.....
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
25090
by: Thierry | last post by:
Hello all, The following code line : array_push($this->content, &$elt); produces the following error : Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the
1
896
by: vikas.khengare | last post by:
Hi Friends.... I have AJAX code which giving "Permission denied to call method XMLHttpRequest.open" error. This error fired by FireFox 1.0 and IE 6 and with Tomacat 5.x. This code work very correctly on the other machine and giving correct output also. I am trying to fetch "html" pages from others server.
3
4391
by: risrikanth | last post by:
hi, When iam executing the perl code iam getting error like"can't call method"bind_param_inout" with out package or object reference .here iam send little bit code plz check and can you tell me the solution for this $stmt = "BEGIN pr_tip_ia_emp(:1); END;"; $sth = $dbh->prepare($stmt) or &interface_error("Prepare Failed for $stmt. $DBI::errstr\n"); $errmsg = "";
1
1473
by: rob77 | last post by:
Hi guys, I am really new to this and I have had a slight scripting error. I get the following: Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of (). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. in /home/fhlinux164/s/standardreferrals.com/user/htdocs/cashback/includes/commonfunc.php on...
3
23777
by: sisqorap | last post by:
Hi all, I have this kind of warning and would like to have it solved: Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of xml_parse_into_struct(). If you would like to enable call-time pass-by- reference, you can set allow_call_time_pass_reference to true in your INI file. in /bla.php on line 94 The code which is behind is like this:
2
3158
by: iavian | last post by:
Hi All, Getting below error, what might be the issue... Can't call method "numify" without a package or object reference at /usr/local/lib/perl5/site_perl/5.6.1/OLE/Storage_Lite.pm line 1329. My progrmam has just 3 lines of code as below #!/usr/bin/perl use Spreadsheet::ParseExcel; my $excel = Spreadsheet::ParseExcel::Workbook->Parse($ARGV);
0
2226
by: tgkprog | last post by:
hi i'm trying to use Win32::IEAutomation to automate clickbank.com navigation and page saving i can login and go to the https://www.clickbank.com/account/showTransactions.htm page but cannot get the startDate text control use Win32::IEAutomation; my $mainPageURL = "https://www.clickbank.com/login.htm";
2
2891
by: r_ahimsa_m | last post by:
Hello, I am learning PHP5. I need to parse XML file and I found a solution in some book on PHP5 ("PHP5 Programming" by Rasmus Lerdors and others). Unfortunately I have two problems that I don't understand: Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of xml_set_object(). If you would like to enable call-time pass-by-reference, you can set...
4
19330
by: Wiinie | last post by:
How can I fix the error "Can't call method "id" on unblessed reference" for the following code? sub language{ my $self = shift; if (!$self->{LANGUAGE}) { my @language = (); my $statement = $db->prepare("select languageId, languageName from language"); $statement->execute();
0
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10437
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10214
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10164
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10001
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9042
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3723
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.