API mail user add autoresponder not working

Discussion in 'Developers' Forum' started by globiws, Jul 31, 2012.

  1. globiws

    globiws New Member

    Hi Everyone,

    I have a script that uses the API to create mail users using $client->mail_user_add

    Everything is working fine, except that autoresponders do not have their start and end date set.

    'autoresponder' => 'y',
    'autoresponder_start_date' => '2001-01-01',
    'autoresponder_end_date' => '2099-12-31',
    'autoresponder_text' => 'whatever the text is for out of office',

    There are no errors returned, and the mail user is created successfully. The autoresponder text is correct, and it is enabled. It's just the dates which are left blank. I looked into the database, and the dates are blank there too.

    Any ideas what format these dates should be?

    Thanks in advance.
  2. Try this:

    Try this:

    'autoresponder_start_date' => '2001.01.01',
    'autoresponder_end_date' => '2099.12.31',

    Please let me know if it works. I am working on the api, too.
  3. globiws

    globiws New Member

    Actually, I received this info from Till, and it worked perfectly:

    I checked the code and the date is used in form of an array. Please try this:

    'autoresponder' => 'y',
    'autoresponder_start_date' => array('day' => 1,'month' => 7, 'year' => 2012, 'hour' => 0, 'minute' => 0),
    'autoresponder_end_date' => array('day' => 20,'month' => 7, 'year' => 2012, 'hour' => 0, 'minute' => 0),
    'autoresponder_text' => 'whatever the text is for out of office',
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    I've updated the api example files in svn.

Share This Page