Announcement

Collapse
No announcement yet.

HTTP API Mail Modul (action=search)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • seb
    replied
    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, 01:17 PM.

    Leave a comment:


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

    Leave a comment:


  • seb
    started a topic HTTP API Mail Modul (action=search)

    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?
Working...
X