Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

mass mail -- 2.2

Quote Reply
mass mail -- 2.2
Mass Mailing to all users gets this error:

Can't call method "insert_id" on an undefined value at GMail::Messages::insert_user line 1735.

The message is not sent and is inserted as undeliverables.

How to fix this?

Anup
Quote Reply
Re: [anup123] mass mail -- 2.2 In reply to
Hi,

I could be wrong. Can the mass mail error be due to few users being "Never" as Last Login. I just tested following:

Signed up a new user.

That user never logged in.

Admin tried to login as that user

Got following error:

Can't use an undefined value as an ARRAY reference at /path/to/Folders.pm

However, once the user logs in, the admin can login as that user without any error.

So could the Admin Mass Mail error reported be also due the fact that there could be users who have never logged in?

Thnx

Anup

Last edited by:

anup123: Oct 29, 2003, 5:48 PM
Post deleted by anup123 In reply to
Quote Reply
Re: [anup123] mass mail -- 2.2 In reply to
This still persists and was also there in 2.2rc1. On the trial install removed all the "Never" login states and the mass mail could be sent. On live install, i cannot obviously remove the "NEVER" login states.

How could the "Mass Mail" be brought back to normal functioning state?

Anup
Quote Reply
Re: [anup123] mass mail -- 2.2 In reply to
We are working on a fix for this and should have it done shortly. In the meantime as a temporary workaround, I recommend instead of doing an "All Users" mail, you perform a "Selected Users" mail, and enter: "Greater than 1980/01/01" for the last login field.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] mass mail -- 2.2 In reply to
Hi Jason,

Thnx. I tried to try the other alternative as suggested but there is no action when i do a search on any criteria in the search form. It refuses to budge. I keep clicking the button but seems that search does not start at all .....

Thnx

Anup
Quote Reply
Re: [anup123] mass mail -- 2.2 In reply to
The problem was that it was trying to insert messages for users who had not yet logged in (and thus didn't have their folders created for them). I've fixed this in GMail::Messages::insert_user:
Code:
@@ -1729,9 +1729,15 @@
#
my ($self, $insert, $size) = @_;
$size ||= 0;
- my $sth = $DB->table('msgtrack')->insert($insert);
- $DB->table('users')->update({ users_space_used => \"users_space_used + $size" }, { userid => $USER->{userid} });
- return $sth->insert_id();
+# Check that the user has folders before attempting to insert a message.
+# If they don't have folders, then just skip the insert.
+ require GMail::Folders;
+ if (GMail::Folders::inbox_fid()) {
+ my $sth = $DB->table('msgtrack')->insert($insert);
+ $DB->table('users')->update({ users_space_used => \"users_space_used + $size" }, { userid => $USER->{userid} });
+ return $sth->insert_id();
+ }
+ return;
}
END_OF_SUB


Alternatively, just download the updated file from the official bug fixes forum.

Adrian

Last edited by:

Jagerman: Nov 4, 2003, 4:47 PM
Quote Reply
Re: [brewt] mass mail -- 2.2 In reply to
Hi Adrian,

Thnx thnx the latest Messages.pm fixed the mass mail bug.

Will a similar fix for Folders.pm be necessary to take care of the following error in a similar scenario:

Can't use an undefined value as an ARRAY reference at /path/to/Folders.pm

Thnx

Anup
Quote Reply
Re: [anup123] mass mail -- 2.2 In reply to
I have the same error message in 2.2.4, and it appears several places. For instance when I try to purge users, I get this "Are you sure you want to delete 14 user(s) from Gossamer Mail?". When I click on 14 users, I get this (same in email users etc):
Error: Can't use an undefined value as an ARRAY reference at /home/.../mail/admin/GMail/SQL/Admin.pm line 1037.