2014년 12월 16일 화요일

email routine joining lots of variables produces truncated email

any help on this one? 

 I have an app that collects user input info in textboxes and passes to variables and compiles and email at the end from all the info passed to variables along the way.

problem:  

the email routine works when lots of the variables are empty but if the user inputs data in all the possible entry fields the email is truncated.

any thoughts?

other clues:
there is a save routine that passes everything to tiny DB so the session can be recalled and all the data gets passed back to the variables...  this works so I know all the data is collected and saved properly.

BTW   worked perfectly until it grew to have more fields so I am suspecting a memory issue.

did this experiment:  changed email routine to call the save to tiny DB routine first and then pull the data from the tiny db during the email routine instead of the variables...  this made it worse. my theory was it would eat less memory but it ate more.



you did not say, which email solution you are using, probably the Activity starter solution?

It would really help if you provided a screenshot of your relevant blocksincluding Do it result of an example text, so we can see what you are trying to do, and where the problem may be.
Also, where exactly will the email be truncated?




Here is a pic of the top of the email routine.. the whole thing is very long so no way to show the whole thing in one screen.




in the screenshot you forgot the Do it result...
Also, where exactly will the email be truncated?
it seems to be, you are not familiar with Do it? see tip 4 here

Top 5 Tips: How to learn  App Inventor




I tested the example with 4500 words of lorem ipsum and it worked fine
I got the complete text also in the Gmail App...
Taifun








Thanks I really appreciate you are trying to help me figure out the problem.

I imported this an it does confirm there can be a large amount of text passed in the activity starter for email.

the app I have is passing stored variables rather than direct text like this and its hard to know whats going on.  I'll play with the do it feature and hope it helps.

also may send a version of the aia if I can get any solution.



could I pass it all to a csv instead somehow?



I had a breakthrough and will post a new issue now that I understand better what is going on..  using the activity starter method for sending an email there are certain characters that seem to be commands to end the string and are not being classified as text in the string.

so far # and & will cause the email routine to end the body of the email and thereby cutting the routine short.

so if my user enters  sometext#2 in the text box, this is passed to a variable and when the variable is part of the email string the # will cause the 2 and everything after it to be missing.

any advice?



you could try to uri encode these characters using the UriEncode block of the web component or just replace # by %23 and & by %26
let us know, what you find out



do you have any examples of how I would accomplish those suggestions in blocks?



Thanks for the encouragement Taifun




re-posting the solution since I fixed another small problem




re-posting the solution since I fixed another small problem. now works with other email besides gmail.





댓글 없음:

댓글 쓰기