Page 1 of 5

Sending 2 page HTML email with SendGrid

Posted: Thu Dec 11, 2014 7:24 am
by Bruce Stuart

Evening,

I'm using Sendgrid api to send a large (if two formatted pages is large) email.

when I send the request (ive had success sending text emails) - I get the message:

414 Request-URI Too Large (that comes from the Appery.io site that I'm using as my proxy).

my console log of the event says:
Failed to load resource: the server responded with a status of 414 (Request-URI Too Large).

The balance of the log - after that error says:
XMLHttpRequest cannot load https://api.appery.io/rest/1/proxy/tu.... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://appery.io' is therefore not allowed access. The response had HTTP status code 414.

(I did specify an Access Control Allow orgin header per some docs I found)...

However:

  1. Have you seen this error before?

  2. Is my email too large for sendgrid or is my request too large to squeeze through my Proxy tunnel and there's a size limit on the https://appery.io site?

  3. How do I fix this issue - I believe the sendGrid component is supported here?

    Thanks!
    Bruce


Sending 2 page HTML email with SendGrid

Posted: Thu Dec 11, 2014 7:49 am
by Bruce Stuart

Also of note - I sent a formatted HTML email earlier today - as a test to ensure I knew how to send HTML emails - and it succeeded just fine.... (just a bit more information).

Also - here is the HTML I'm trying to send ......

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"

TBI COA Questionairre Email

Image
Date: ((date))

Dear ((username)),

((sendername)) has shared a sales opportunity with you. Here are the
details of that opportunity:

spanGeneral Information about
the Opportunity:/span


Code: Select all

   Customer Name : 
   ((scustomername)) 

   Date of Opportunity: 
   ((dopporunitydate)) 

   Contact Name : 
   ((scontact)) 

   Estimated Revenue : 
   ((nrevenue)) 

   Solution Type : 
   ((sproduct)) 

   Current Customer or 

Prospect :
((sunsolicatedrfplead))

spanResponses to the Issues
Questionairre Section:/span


Code: Select all

   Is there a compelling 

event and do we understand it?
((bcompellingevent))

Code: Select all

   Can we create a compelling 

value proposition?
span((bcompellingvalueprop))/span

Code: Select all

   Does thisf fit MDT pricing 

and profitability guidelines?
span((bfitsprofitandpricing))/span

Code: Select all

   Do we match locations? 
   span((bmatchonlocations))/span 

   Do we understand the 

formal buying / decision making process (who, how, when) ?
span((bbuyingprocessunderstood))/span

Code: Select all

   Are there acceptable 

contract terms?
span((bcontracttermsacceptable))/span

Code: Select all

   Do we have strength in 

customer's market or industry?
span((bmarketorindustrystrength/spanspanspan class="Apple-converted-space"))/span/spanspanspan class="Apple-converted-space" /span/span

Code: Select all

   Do we have the right 

insurances to cover the work?
span((binsurancecoverswork))/span

Code: Select all

   Do we know the competition? 
   span((bweknowthecompetition/spanspanspan class="Apple-converted-space"))/span/spanspanspan class="Apple-converted-space" /span/span 

spanResponses to the Customer
Questionairre Section:/span


Code: Select all

   Does customer have a clear 

understanding of value proposition?
((spanbcustomerunderstandsvalue/span))

Code: Select all

   Do we have the right 

customer coach? Do they impact the decision?
span((/spanspanbrightcustomerdecisionmaker/spanspan))/span

Code: Select all

   Does the client have a 

Partnership Mentality?
span((/spanspanbpartnershipmentality/spanspan))/span

Code: Select all

   Is the Customer a value 

buyer (not price driven)?
span((/spanspanbvaluedrivenspan class="Apple-converted-space"/span/spanspan))/span

Code: Select all

   Do we have an existing 

relationship with decision maker and or influencer?


Code: Select all

   span((/spanspanbexistingrelationshipwbuyer/spanspan))/span 

    there 

significant spend or a current contract in place with MDT?
span((/spanspanbexistingcontractorspend/spanspan))/span

Code: Select all

   Are there multiple markets 

to pursue?
span((/spanspanbmultiplemarketstopersue/spanspanspan class="Apple-converted-space")) /span/span

Code: Select all

   Is procurment out of the loop? 
   ((spanbprocurementoutofloop))/span 

   Are they dissatisfied with 

their current supplier?
span((/spanspanbexistingsolutionbroken/spanspan))/span

Code: Select all

   We have customer C-level 

or Executive support for initiatives?
span((/spanspanbcustomerexecutivesupportspan class="Apple-converted-space"span/span/span/spanspanspan class="Apple-converted-space"))/span/spanspanspan class="Apple-converted-space" /span/span

You can view this opporunity, make changes to it, and share it with
others
by downloading the TrueBlue COA app on the Apple AppStore, the Google
Play store for Android Phones, or Windows Store. You can also
navigate to
the application directly from your phone, tablet or other device by
clicking
here
to access the application by HTML5 website:

The
TrueBlue Customer Opportunity Assessment Application

(Powered by The
Software Studio
)


Sending 2 page HTML email with SendGrid

Posted: Thu Dec 11, 2014 7:53 am
by Evgene Karachevtsev

Hello Bruce,

1) Yes, we have seen this error, it means that you need to test it on a real device, or you have no permission to the target server.
2) We don't know how large your payload are. Could you please provide us with some details on that?
3) The only components that can be imported in Appery.io builder are Salesforce components.
We are speaking about requests that are the part of ethernet structure.


Sending 2 page HTML email with SendGrid

Posted: Thu Dec 11, 2014 7:56 am
by Bruce Stuart

and the web-jargon on my error:

https://support.sendgrid.com/hc/en-us...

So - do I continue to use the built in Sendgrid component - or do I need to 'roll my own' if the generated error is because the plug-in is formatting the API request incorrectly??

Bruce


Sending 2 page HTML email with SendGrid

Posted: Thu Dec 11, 2014 1:00 pm
by Evgene Karachevtsev

Bruce,

1) We don't know what component do you use, and why you call it sendgrid component.
2) According to your link to the sendgrid's support we can say that your request is wrong.
Please use this document to correct your request
https://sendgrid.com/docs/API_Referen...
In fact, you should add a 'html' parameter and all html message in it, but without headers, doctype, etc., only content


Sending 2 page HTML email with SendGrid

Posted: Thu Dec 11, 2014 4:52 pm
by Bruce Stuart

Evgene,

thank you for the work here. Here's a reply that has some research to it. Still need help!

  1. I'm using the canned plug in called Sendgrid_mail send. Here are my settings. Please note the success message from the test with a small HTML payload (about 200 bytes).

    Image

  2. The size of the HTML payload I'd like to send - according to a (payload).length from my console.log prior to the error is 32196 bytes - and is visually represented by what is in my first post - however - the HTML grid I'm using or would like to use - is not visually represented there. I can email the HTML directly to the support email box if you'd like.

  3. I don't think I need to correct the request - I am using the plug in per specification I believe. Here's the test of my service (the same one that was successful in step 1 above) when I get the error after only changing the HTML payload - again - just testing the service from the appery UI - let me know if I'm not using it correctly. This service succeeds above with the smaller payload - and then fails with the larger payload. The Sendgrid lilnk that I sent in the original request for support above - seems to be the error - I'm not sure how the doc you referenced... applies.

    Image

    Thanks again for all the help!

    Best,

    Bruce


Sending 2 page HTML email with SendGrid

Posted: Thu Dec 11, 2014 4:58 pm
by Bruce Stuart

Evgene,

Just a bit more information in case you'd like to poke around in my app to repro....

  1. The link to test my app can be found here:

    http://appery.io/app/mobile-frame?src...

  2. The instructions to log in - are found in this other post - where Yurii has been helping me through another tough issue.....:-)

    https://getsatisfaction.com/apperyio/...

    To repro this problem - or to capture the HTML I'm trying to send along.... follow the same steps in the link - however, at the bottom of the UI - click the 'Share Button' - enter an email in the sharing UI like 'a href="mailto:bruce.stuart@5bsinvestments.com" rel="nofollow"bruce.stuart@5bsinvestments.com/a' ..... thanks!

    Bruce


Sending 2 page HTML email with SendGrid

Posted: Fri Dec 12, 2014 1:57 am
by Yurii Orishchuk

Hi Bruce,

Again could not login into your app with your credentials.

The problem you have faces out seems to be restriction of the query string parameters. More details here: http://stackoverflow.com/questions/81...

So this request should be sent in post with real post data(not query string).

There is some problem with our proxy to send post parameters(withing post data) and needed content type. It's new problem reported yesterday. We aware about it. We need some time to investigate a solution for it.

So currently i can suggest you options:
1 wait for solution from us.
2 use server code to send post to send grid.

Regards.


Sending 2 page HTML email with SendGrid

Posted: Fri Dec 12, 2014 3:03 am
by Bruce Stuart

Yurii,

Thanks much for the followup!. I corrected the credentials issue - and they are back We were doing some testing today with the client.

The breakpoint in terms of where the challenge occurs is somewhere between these two numbers from my tests (for the HTML parameter)....(from my logging in tests)..

the length of the successful HTML is:2866
the length of the unsuccessful HTML is:4522.

Do you have a working example of server code used to send emails via send grid?

I suppose part of my decision depends on the answer to the question - what priority does this issue have? and - given the priority - what's the usual time frame to get these things fixed?

Best,

Bruce


Sending 2 page HTML email with SendGrid

Posted: Mon Dec 15, 2014 2:24 am
by Bruce Stuart

Any estimate on when a solution might be forthcoming ?