ios - Disposable Temporary Email with attachment download API support -


i working on application uses guerrillamail temporary email , use given api's contents of emails sent id. not able achieve if email contains attachment how can download using api or parse mime using mime parser library if have email source?

or can please recommend alternative provide api support download attachments.

i tried see if find answer, made code seems work:

var template_content = $("#mail")[0].content;  var tep = $("#mail");    function getmail(id, mail_id) {    $.get("https://api.guerrillamail.com/ajax.php?f=fetch_email&lang=en&sid_token=" + id + "&email_id=" + mail_id, function(mail) {      console.log("mail:");      console.log(mail);      template_content.queryselector('p:nth-of-type(1)').innerhtml = mail.mail_from;      template_content.queryselector('p:nth-of-type(2)').innerhtml = mail.mail_subject;      template_content.queryselector('p:nth-of-type(3)').innerhtml = mail.mail_body;      if (mail.att == 0) {        template_content.queryselector('span').innerhtml = "-none-";      } else {        var sp = template_content.queryselector('span');        $.each(mail.att_info, function(l, att) {          console.log(att);          var = document.createelement('a');          console.log(a);          var linktext = document.createtextnode(att.f + " [" + att.t + "]");          a.appendchild(linktext);          a.title = att.f + " [" + att.t + "]";          a.href = "https://www.guerrillamail.com/inbox?get_att&lang=en&sid_token=" + id + "&email_id=" + mail.mail_id + "&part_id=" + att.p;          sp.appendchild(a);        });      }      var clone = document.importnode(template_content, true);      document.queryselector('#mails').appendchild(clone);    });  }    $.get("https://api.guerrillamail.com/ajax.php?f=get_email_address&lang=en", function(data) {    var email = data.email_addr;    var id = data.sid_token;    $("#email_addr").text(email);    $("#pane").show();      $("#get").click(function() {      $.get("https://api.guerrillamail.com/ajax.php?f=get_email_list&lang=en&sid_token=" + id + "&offset=0", function(data) {        console.log(data.list);        var tep = $("#mail");        $.each(data.list, function(i, mail) {          getmail(id, mail.mail_id)        });      });    });  });
p {    display: inline  }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>    <div id="pane" style="display:none">    <p>send email attachment [<b id="email_addr">frefr</b>] , press button:</p>    <button id="get">get mails!</button>  </div>    <br/>  <br/>    <div id="mails">    </div>      <template id="mail">    <div>      <h2>mail</h2>      sender:      <p>1</p>      <br/>subject:      <p>2</p>      <br/>body:      <br/>      <hr/>      <p>3</p>      <br/>      <hr/>attachments:      <br>      <span></span>    </div>  </template>

i can't find info attachment stuff in the documentation, in code used "normal" attachment link, , seems work:

https://www.guerrillamail.com/inbox?get_att&lang=en&sid_token={sid_token}&email_id={email_id}&part_id={part_id}"; 

look @ example code see how use it.

you seem have of code done on iphone side, have add call get_att url att parameters fetch_email.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -