473,563 Members | 2,571 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 7249
> $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
25080
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
4373
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....
1
1455
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...
3
23771
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...
2
3149
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 =...
0
2210
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
2857
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...
4
19129
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
7658
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7579
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...
0
7941
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...
0
6235
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...
1
5479
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5201
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3628
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2077
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
0
909
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...

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.