Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Re: E-mailing Owners

Quote Reply
Re: E-mailing Owners In reply to
I don't get it.

Here is the code from the mailer:

Code:
if ($in->param('all')) {
$sth = $sub->prepare ("SELECT * FROM Links WHERE ReceiveMail = 'Yes'");
}
else {
$ids = join ",", $in->param('mail');
$ids or print "No users were selected!" and exit;
$sth = $sub->prepare ("SELECT * FROM Links WHERE ID IN ($ids) AND ReceiveMail = 'Yes'");
}
$sth->execute();
while ($link = $sth->fetchrow_hashref) {
($id, $name, $email) = ($link->{'ID'}, $link->{'Contact_Name'}, $link->{'Contact_Email'});

The values for the ID, $name and $email are taken from the same "link" so you can't get it mixed up.

Here's a subset of the mailing:

Code:
379 - Invalid email address: . Skipping.
380 - Message would have been sent to 'Ira@postcards.com'
381 - Already mailed to: 'Ira@postcards.com'!
382 - Already mailed to: 'Ira@postcards.com'!
383 - Invalid email address: . Skipping.
384 - Invalid email address: . Skipping.
385 - Invalid email address: . Skipping.
386 - Invalid email address: . Skipping.
387 - Invalid email address: . Skipping.
388 - Invalid email address: . Skipping.
389 - Already mailed to: 'Ira@postcards.com'!
390 - Already mailed to: 'Ira@postcards.com'!
391 - Already mailed to: 'Ira@postcards.com'!
392 - Already mailed to: 'Ira@postcards.com'!
393 - Already mailed to: 'Ira@postcards.com'!
394 - Message would have been sent to 'ira@postcards.com'
395 - Already mailed to: 'ira@postcards.com'!
396 - Already mailed to: 'ira@postcards.com'!
397 - Already mailed to: 'ira@postcards.com'!
398 - Already mailed to: 'Ira@postcards.com'!
399 - Already mailed to: 'Ira@postcards.com'!
400 - Already mailed to: 'Ira@postcards.com'!
401 - Already mailed to: 'Ira@postcards.com'!
402 - Already mailed to: 'Ira@postcards.com'!
403 - Already mailed to: 'Ira@postcards.com'!
404 - Already mailed to: 'Ira@postcards.com'!
405 - Already mailed to: 'Ira@postcards.com'!
406 - Already mailed to: 'Ira@postcards.com'!
407 - Already mailed to: 'Ira@postcards.com'!

In that case, the _only_ link he'd be notified of is the very first one - 380.

This should really be a bit smarter and put all the links for that person together, and send one letter with all the values, but it doesn't.

Note-- the case "Ira" and "ira" generate two different mailings.

To correct for that, everything should be lowercased before tallying the names.



Subject Author Views Date
Thread E-mailing Owners Lance Rasmussen 3118 Apr 11, 2000, 10:06 AM
Post Re: E-mailing Owners
pugdog 3023 Apr 11, 2000, 10:20 AM
Post Re: E-mailing Owners
Lance Rasmussen 3020 Apr 11, 2000, 11:11 AM
Post Re: E-mailing Owners
pugdog 3028 Apr 11, 2000, 6:18 PM
Post Re: E-mailing Owners
charhua 3023 Apr 11, 2000, 6:50 PM
Post Re: E-mailing Owners
pugdog 3037 Apr 11, 2000, 7:34 PM
Post Re: E-mailing Owners
pugdog 3023 Apr 11, 2000, 9:54 PM
Post Re: E-mailing Owners
Lance Rasmussen 3023 Apr 12, 2000, 6:56 AM
Post Re: E-mailing Owners
Lance Rasmussen 3017 Apr 12, 2000, 10:56 AM
Post Re: E-mailing Owners
charhua 3022 Apr 13, 2000, 4:53 PM
Post Re: E-mailing Owners
pugdog 3032 Apr 13, 2000, 8:59 PM
Post Re: E-mailing Owners
Alex 3019 Apr 17, 2000, 8:23 AM