For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 22 replies, 4 voices, and was last updated 13 years, 2 months ago by
Publio Decio.
-
AuthorPosts
-
Publio DecioMember@ octavio
Good morning,
I read the help on “MobiOne Widget” I want to know if it is possible to dynamically change the text of the email, and do not define it before.
Hello
AlessandroApril 24, 2013 at 4:50 pm #338438
support-octavioMemberHi Publio Decio,
The Visual Designer’s Send Mail action does not support modification of the msg content. An alternative is to use javascript to construct a mailto: URL – this is basically what the SendMail actiond does. If you are not comfortable with JavaScript coding then you may consider posting your exact requirement to the Getting Help forum and seek volunteer assistance or request professional assistance.
April 29, 2013 at 7:09 am #338590
Publio DecioMemberHi Octavio
My app is native IOS. if I wanted to format the text of the email in the following way (example: in 3 lines):
foo
pluto
mouseI can not format it correctly in the IOS version. I tried to use \ n or the CR & LF but if it works in the test center + outlook does not work on the device (iphone).
I tried searching but could not find anything that worked.
Do you have any idea to format text?thanks
AlessandroApril 29, 2013 at 10:55 am #338597
Stu WadeMemberI believe that this is a solution to your problem …
Create a large Text Area widget somewhere in your project
In the documentReadyHandler set its visibility to hidden
Prepare your email in the .val property USING HTML so the .val starts < html > without the spaces and ends < /html >
Do all your formatting using HTML – for my application I forced a mono space font and used the pre tag which gave me full ‘typewriter’ formatting. Depending on exactly what you need to do the required HTML may be very straight forward or downright tricky – so enjoy.
The final stage is to set up a send email button which picks up the text area as the content field when you click this the native email app steps in and lo and behold you are looking at your formatted text ready to goPs added in edit
I’m running windows XP on my development machine and outlook really hates this approach so the M1 emulator won’t work but trust me the web app on my iPod works a treatMay 1, 2013 at 1:19 pm #338707
Publio DecioMemberThank you for your help. but I’m doing something wrong.
I created this code in the text area:‘<html><body><p>Torneo: <br />del: <br />ore: <br />Match: <br />Superficie: <br />Score: <br /></p><p> Commento partita: </p></body></html>’
but when I click the button in the email completely ignores the html code
I used this function‘mailto:’ + email + ‘?subject=’ + subject + ‘&body=’ + encodeURIComponent($(‘#ac-mtcmail-textArea1’).val());
or
‘mailto:’ + email + ‘?subject=’ + subject + ‘&body=’ + $(‘#ac-mtcmail-textArea1’).val();thanks again
May 1, 2013 at 3:20 pm #338713
Stu WadeMemberSeems that it was I that was being unclear, sorry.
The button I click has its on click action set to ‘Send Email’ and (for my use) I populate the Email […] screen with To: empty, Subject: a constant and Message: ${Report} where Report is the Id of my text area.
I do not explicitly use the mailto: construct I let M1 handle all those messy details.
I am not familiar with the <br /> tag in your example – I simply use <br>
May 2, 2013 at 6:10 pm #338780
support-octavioMemberHi Stu,
Correct me if I’m wrong but my understanding is you are reporting that the SendMail action recognizes and renders <html> markup msg content when performed in an iOS webapp. But from a native app the msg content displays the <html> program text literally rather than render it. If this is the problem then please note that you are just getting lucky in a webapp form of SendMail. This will not work in all iOS versions and is not part of the mailto: spec. Given that we only support text email.
The sendMail action is implemented differently between webapp and native app on iOS. For webapp we simply invoke a mailto: url and let the OS handle it. In a native app this is not possible and we use the cordova/phonegap mail composer plugin.
May 3, 2013 at 3:56 am #338790
Publio DecioMemberHello Stu & Octavio
I found this plugin.
https://github.com/phonegap/phonegap-plugins/tree/master/iPhone/EmailComposerI modified cordova.addConstructor as indicated in the post stackoverflow
(http://stackoverflow.com/questions/10587398/cordova-custom-plugin-structure-wo-callbacks)and I built the function for sending the mail, but by executing the program on: IPAD seems to ignore the command.
I continue to investigate, if you find an alternative solution, post itHello
AlessandroP.S. could be an interesting solution
May 3, 2013 at 4:30 am #338791
Stu WadeMemberThanks both,
Yes, I too am now in the mire … See my thread ‘Aaaargh’ below.
Will look at the phonegap stuff you indicate – perhaps I shall find inspiration.
When the WebApp worked so perfectly – I really thought I was home free – bah!!!
May 3, 2013 at 5:36 am #338795
Publio DecioMember@ Octavio & Stu
I was testing the function: phoneui.composeEmail = function (subject, body, to, cc, bcc, isHTML)
(Contained in \ res \ phoneui.js) running in the web application’s okay, while running on my ipad the program crashes.the parameters are correct and the body is in html format.
Do you have any suggestions?
thanks
AlessandroMay 3, 2013 at 6:45 am #338798
Unknown AuthorParticipantphoneui.composeEmailFromPage($('#m1-PageName'), 'to@email.com', 'Subject', 'Email Text');May 3, 2013 at 7:29 am #338800
Publio DecioMemberThis function handles the text in html format?, the other in the last parameter is used to identify the format. I used 2.5 version not tested in 2.3
Thanks
May 3, 2013 at 8:13 am #338802
Stu WadeMemberI have now checked the composeEmailFromPage function in phoneui.js – it constructs an email body then explicitly uses a call of composeEmail with the isHTML argument set false – so, unless I’m being extraordinarily thick (quite possible this problem is “doin’ my head in”), it will not handle HTML. Sorry 1tc but keep trying we need all the help we can get.
May 3, 2013 at 9:27 am #338804
Publio DecioMemberupdated:
the function works perfectly phoneui.composeEmailFromPage($(‘#m1-PageName’), mailto:’to@email.com‘, ‘Subject’, ‘Email Text’);phoneui.composeEmail = function (subject, body, to, cc, bcc, isHTML) function does not work
both with and ios version 2.5 of MobiOneis the problem of MobiOne 2.5 ?
bye
May 3, 2013 at 10:23 am #338810
Stu WadeMember@Publio
Does ‘works perfectly’ mean you got html code correctly interpretted? I tried …
phoneui.composeEmailFromPage($('#m1-Chicago'),'','Ad Hoc Bridge',$('#m1-Chicago-Report').val());and got the raw uninterpretted html …
What am i missing? Am I stupid?
-
AuthorPosts
