Writing a basic plugin for fetchmail - help

OliverScott

Verified User
Joined
May 4, 2007
Messages
57
EDIT: Now solved (see below)

I am trying to write somthing which will allow admins to easily add and remove 'accounts' from their fetchmailrc file.

I know there will be a few technical problems to overcome but thought I would be able to manage it (with my limited php skills) :)

I seem to have hit a brick wall though:

I have created the plugin and can get it to parse through a fetchmailrc file (currently in the plugin directory) and display the results in a nice table (sorted by destination email address). This table is made up of text input fields so that people can edit the values.

When I try to post the changes to another php file in the same directory (to be writen back to the file), I get nothing in my $_POST array.

i.e.

My index.html contains (in its most basic form):

#!/usr/local/bin/php
Fetchmail GUI Plugin<br>
<?php
echo '<form name="fetchmail" method="post" action="./Fetchmail_GUI/save.php">';
echo 'Name: <input type="text" name="name" />';
echo '<input type="submit" name="submit" value="Update">';
echo '</form>';
?>

And my save.php file contains:

#!/usr/local/bin/php
Fetchmail GUI Plugin<br>
<?php
echo print_r($_POST);
?>

The output I get is:

Array ( ) 1


Given that I have this working sucessfully through the regular hosting on the server, I am guessing that something to do with running this as a DA plugin means that I can't POST things? In which case what is the right way to do this?
 
Last edited:
Back
Top