Results 1 to 7 of 7

Thread: formmail-postconfig setup

  1. #1
    Join Date
    Apr 2012
    Posts
    6

    Default formmail-postconfig setup

    Hi,

    I was hoping to use the formmail-postconfig file so I could keep the user specific config in there and drop the latest and greatest formmail.php script next to it at upgrade time and not lose my settings. as this file is read at the end of the config section I assumed it would override any already-set config.

    It seems that this is not the case and it gets confused that the AT_MANGLE is already set and I can't just override it in the post config file.

    Is this the expected behaviour? I know I can just go into formmail.php file and comment out the duplicate info but I would prefer no to have to do this every time formmail is upgraded.

    Is this not how postconfig was supposed to be used? Any problems using it this way?

    Jim

  2. #2
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: formmail-postconfig setup

    Hi,

    Unfortunately PHP doesn't allow "define" constants to be re-defined or even un-defined.

    So, the technique to use is to do this in the formmail-preconfig.inc.php file like this:

    PHP Code:
    define("MY_AT_MANGLE","XYZZY"); 
    then in FormMail:
    PHP Code:
    define("AT_MANGLE",MY_AT_MANGLE); 
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    Apr 2012
    Posts
    6

    Default Re: formmail-postconfig setup

    Thanks Russell,

    That does mean a small edit to the formmail.php file though (which I was trying to avoid). If I were to do that I guess I may as well simply comment the line in formmail.php (or am I missing something?)

    Thanks

    Jim

  4. #4
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: formmail-postconfig setup

    Hi,

    Yes, it's a small edit but it's one time only.

    You won't lose that setting when you upgrade FormMail.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  5. #5
    Join Date
    Apr 2012
    Posts
    6

    Default Re: formmail-postconfig setup

    Hi,

    I'm not sure I understand, if I replace the formmail.php file with the latest one then surely I will lose that setting each time, unless I remember to go in and alter it every time?

    I was really looking for a way that I could simply take the latest formmail script as it is released and drop it on all my websites.

    Thanks

    Jim

  6. #6
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: formmail-postconfig setup

    Hi,

    Sure, if you overwrite your copy of FormMail with a clean download, you'll lost settings.

    But if you use the Upgrade Wizard the settings are kept.

    So, you could have a single version of FormMail with settings you want to use and that's the same on all your websites. And, the actual setting values are in a preconfig file (like the example I gave) and may be different for each website.

    To upgrade, you'd use the Upgrade Wizard once and the resulting copy can be dropped into each website.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  7. #7
    Join Date
    Apr 2012
    Posts
    6

    Default Re: formmail-postconfig setup

    Thanks Russell, I just figured that out and was about to reply

    Thanks for a great script!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Setup FormMail on Yahoo Small Business
    By aaronwsi in forum Community Support
    Replies: 11
    Last Post: 17-Nov-2009, 05:33 AM
  2. FormMail Setup Problem Windows 2003/PHP 5.2.9-2
    By GillyB in forum Community Support
    Replies: 0
    Last Post: 06-Nov-2009, 11:51 AM
  3. trying to setup formmail on my own server
    By mcameron in forum Community Support
    Replies: 1
    Last Post: 08-Dec-2006, 09:14 PM
  4. Used Config Page to setup formmail, still getting error.
    By frogman in forum Community Support
    Replies: 4
    Last Post: 27-Nov-2006, 07:27 AM
  5. error message on formmail setup
    By ncangler in forum FormMail Subscription Support
    Replies: 1
    Last Post: 25-May-2005, 10:54 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •