View Issue Details

IDProjectCategoryView StatusLast Update
0008720phplist applicationMessage Send Processpublic18-02-08 14:08
Reporterh2b2 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.10.3 
Target Version2.10.7Fixed in Version2.10.5 
Summary0008720: Using -p send from the commandline doesn't seem to work
DescriptionThis issue was reported by Gord Fisch (gfisch) on the forum: http://forums.phplist.com/viewtopic.php?t=7331

"Trying to get the command line to upload a message

/usr/local/bin/php /homedir/admin/lists/bin/phplist -psend -s New Member Notification -l 2 < $filename

I had this working on an older, hacked version of phplist on another server but the site has moved to a server with php 5. I updated to the latest version of phplist.

I upload a different message every night with the above then process the queue.

All paths and so on are correct, the $filename exists and has content but when I run the command,
phplist sets up a 'draft' message with no subject and no content. "

This is the fix gfisch suggested:

I added some lines in send_core.php around line 80
That was creating a 'blank' draft and redirecting.
The redirecting caused problems for the commandline.

original:
Redirect($_GET["page"]."&id=$id");

new:
if(!$GLOBALS["commandline"]){
Redirect($_GET["page"]."&id=$id");
exit;
}
Additional InformationThe problem apparently occurred on a PHP 5 server.
TagsNo tags attached.

Relationships

related to 0003721 closed phplist 2.10.x 

Activities

michiel

07-12-06 16:58

manager   ~0021822

I was always wondering whether anyone knew about and used the sending messages from commandline, but they obviously did. Nice one.

user1822

26-07-07 21:24

  ~0029820

Suggestion implemented and tested.