Homepage | Products | OX Knowledge Base | Support | Try Now | Contact | Company
OX Logo
Results 1 to 3 of 3
  1. #1

    Default HTTP API Mail Modul (action=search)

    Hallo,

    ich habe ein Problem mit der Http API. Ich benutze folgenden Code:
    Code:
    function test() {
    	var data = '[{"col":600, "pattern":"1"},{"col":600, "pattern":"3"}]';
    	dojo.xhrPut({
    		url: '/ajax/mail?action=search&session='+session+'&folder=default0/testing.unterordner2&columns=600,603,609,601,607',
    		putData: data,
    		load: function(resp, ioArgs) { alert(resp) }
    	})
     
     }
    Statt mir die Emails mit der ID 1 und 3 aus dem Ordner zu liefern bekomme ich als Response aber alle im Ordner befindlichen Mails.
    Suche ich mit der gleichen Funktion nach Betreffzeilen also:
    Code:
    var data = '[{"col":607, "pattern":"subject1"},{"col":607, "pattern":"subject3"}]';
    ... funktioniert das ganze einwandfrei und ich bekomme die gewŁnschten Emails im Response.

    Sieht jemand einen Fehler?

  2. #2
    Join Date
    Feb 2007
    Posts
    253

    Default

    The search supports the fields from, to, cc, bcc, subject and body. If you want to get mails based on IDs, use action=list.

  3. #3

    Default

    Quote Originally Posted by Viktor Pracht View Post
    The search supports the fields from, to, cc, bcc, subject and body. If you want to get mails based on IDs, use action=list.
    thank you for the quick response. could be useful for others to add these information to the API documentation.

    edit:
    this works perfect (as example):
    Code:
    function test() {
    	var data = '[{"folder":"default0/testing.unterordner2", "id":"1"},{"folder":"default0/testing.unterordner2", "id":"3"}]';
    	dojo.xhrPut({
    		url: '/ajax/mail?action=list&session='+session+'&columns=600,603,609,601,607',
    		putData: data,
    		load: function(resp, ioArgs) { alert(resp) }
    	})
     
     }
    Last edited by seb; 04-28-2010 at 01:17 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
  •