Hi, on a little blog script I've put together, I can get a list of commenters to notify of a new comment. That's fine and the poster is not included. The trouble I'm having is, sending the mail out from that list.
to => 'email@example.com',
from => 'firstname.lastname@example.org',
subject => 'news from foo inc.'
body => $mail_content,
07-08-2013, 11:48 AM
That looks good that does, but unfortunately those modules are not on the cheap server that I've used for hosting the next year for my treks in Spain (and I'm the only Perl user on the whole thing - they had to turn Perl on specially for me).
07-08-2013, 11:53 AM
Why don't you install them in your storage yourself?
07-08-2013, 12:03 PM
I'll have to see if they'll let me. Only had server a few days and just testing stuff out before September. A previous host on a short term site wouldn't let me do that.
Figured you'd be on holiday this time of year.
07-08-2013, 01:05 PM
I don't get it. What do you mean if they let you? It's a hosting where you have some space and you can upload whatever source code you want, no?
07-08-2013, 01:28 PM
On the higher end hosts that have been going for 10 years or so, yes, a lot do. Others have a thing in Cpanel where you can install a module (but some hosts turn that off). I think the newer ones, where nobody uses Perl, might be a bit scared of it. This is just a dirt cheap host and while I get good response from them, they're geared mainly to PHP.
Let's face it, about 1 percent of websites now use Perl and of that 75 percent use 5.8 or earlier. We're a dying breed we are.
Noticed a number of new hosts, don't even have Perl or Python at all. They're just pure PHP.
Anyways, Solved it. Used for, instead of foreach. Local tests only showed the last one - live test gave me 4 of each.
Changing the foreach loop to for gave me the correct emails and the temp file is now unlinked, wait for the next time a comment is made. Will have to give the temp file a unique name each time to prevent mess ups.
I so rarely use a for loop, that I forgot about it. Duh.
Hey Sixtease, I'm getting old (68 in a couple of months). New kids on the block do newer (but not always safer) things.
The mini blog script is only 50k and will do what I want for a short term thing.