Load external HTML

  • My german isn´t so good so I´ll take this in english.

    Since you cant use php in david I want to use a external php script and load the source code as a new message.

    It should work something like this.
    1) Open a dfml form and select som params.
    2) Send this to a php form that loads info from a database.
    3) Create a new html message there the source of the message is loaded from the php file.
    4) The user can edit the message and ad recepients like a normal mail.

    My problem is that I cant figure out how to do number 3. Would appriciate all ideas!

    // Anton

  • Hi Anton!

    I'll try to answer in english language...

    The only idea to create a message by a php-script is to use the Filescan-Services of David. You have to create a file in the david\import-directory. This file has to contain all @@-Commands and the message.

    You can use the command @@HTML to create a HTML-message.

    regards

    Björn

  • The file actually don't need to be based on php.

    But I want to have a function that loads data from our Sql databse based on a product nr.

    If I use the Filescan-Services how should the file look like. We only have archive.dir files, and blank messages in our import folder so I dont have any information to start my work from.

    // Anton

  • Hi!

    First, the FileScan-Service for the messagetype "email" has to be configured in the DvAdmin. At menu-option Configuration->Services->FileScan Services you have to add a service: Path must be set to i.e. \\SERVER\David\Import\*.EML an dataformat eMail.

    The Import-Directory isn't in your Archive-System, but direct on filesystem of your David-machine.

    Second you can create a file with the extension .eml, witch contains code like this:

    @@-Commands are documented in the helpfile of your InfoCenter or the big black manual.

    Björn

  • Would it be possible to write a php script that generates a template that is saved on the client computer eg. on the desktop.

    And that the user could open this template and insert the recievers.
    I have been able to generate a template on the desktop but I cant enter any recievers in this message since it is "read only".
    Any ideá how to make the template open for editing.
    I think this would be easier to do and it would result in the same thing.

  • Hi!

    Why do you want to let the user edit the file?

    I think the easyiest way would be to pass all information for the message to the script and to let the script create the whole messagefile.

    In detail, what do you want to realize?

    You can pass all data by a simple HTML-Form to a php-script an let the php-script create the message.

    regards

    Björn

Jetzt mitmachen!

Du hast noch kein Benutzerkonto auf unserer Seite? Registriere dich kostenlos und nimm an unserer Community teil!