Page 3 of 4

sendgrid attachment

Posted: Mon Jan 19, 2015 12:09 pm
by Maryna Brodina

Hi @Hi4All!

Have you shared the app?


sendgrid attachment

Posted: Mon Jan 19, 2015 12:53 pm
by Hi4All

I already did ..

thank you


sendgrid attachment

Posted: Tue Jan 20, 2015 8:44 am
by Maryna Brodina

Please clarify project name.


sendgrid attachment

Posted: Tue Jan 20, 2015 8:46 am
by Hi4All

RepairEXP


sendgrid attachment

Posted: Tue Jan 20, 2015 11:06 am
by Alena Prykhodko

Hello,

As we can see there is custom JavaScript, no Appery.io functions used.
Unfortunately this is something outside the scope http://devcenter.appery.io/support-po... of standard Appery.io platform support . You may consider purchasing Advisory Pack to get more in-depth help on this question. Here is more information about Advisory Pack http://appery.io/services/#Advisory_Pack.


sendgrid attachment

Posted: Wed Jan 21, 2015 6:21 am
by Hi4All

Finally, I was able to receive the email with attachment, here are the main errors I overcome,

  • If you get the error INVALID_STATE_ERR: DOM Exception 11
    You need to take the code request.withCredentials = true; to be right before
    request.send(formData);

  • If you get the error "Illegal constructor", then try to change the way you are creating the Blob object, below code is very useful in this case,

    function NewBlob(data, datatype) {
    var out;

    try {
    out = new Blob([data], {
    type: datatype
    });
    console.debug("case 1");
    } catch (e) {
    window.BlobBuilder = window.BlobBuilder window.WebKitBlobBuilder window.MozBlobBuilder || window.MSBlobBuilder;

    Code: Select all

     if (e.name == 'TypeError' && window.BlobBuilder) { 
         var bb = new BlobBuilder(); 
         bb.append(data); 
         out = bb.getBlob(datatype); 
         console.debug("case 2"); 
     } else if (e.name == "InvalidStateError") { 
         // InvalidStateError (tested on FF13 WinXP) 
         out = new Blob([data], { 
             type: datatype 
         }); 
         console.debug("case 3"); 
     } else { 
         aler("We are screwed, blob constructor unsupported entirely"); 
         console.debug("Errore"); 
     } 

}
return out;
}

The problem which I'm facing now is that attached image is corrupted in the attachment of the email.


sendgrid attachment

Posted: Wed Jan 21, 2015 8:12 am
by Ihor Didevych

Hello,

Sorry, but debugging custom app code is outside the scope of support.


sendgrid attachment

Posted: Wed Jan 21, 2015 8:20 am
by Hi4All

Did I ask your debugging support..!!?

I'm explaining what is my experience with this and might other users can have some inputs in regards.


sendgrid attachment

Posted: Wed Aug 17, 2016 2:46 pm
by Moez Ali

hey please tell me how to attach a file in email i am using sendgrid plugin


sendgrid attachment

Posted: Wed Aug 17, 2016 3:35 pm
by Evgene Karachevtsev

Hello Moez,

Could you please clarify what have you tried and what exactly doesn't work? Have you tried any approach described in this thread?