I am sending QR code image generated via api using
Office365Outlook.SendEmail(User().Email;,"Your QRcode is attached", HtmlText_QR.HtmlText,{Attachments:Myqr,IsHtml:true});
I checked that Collection Myqr contains the QR code image named 'QRCode.jpg'
I placed code in Htmltext_QR as Img src='QRCode.jpg'
After clicking send button received below error
Office365outllook send email failed.
If I use any other image it is working fine. May I know what could be the reason? How to fix this
Hi @azhicon :
Could you tell me what Myqr is?
I'v made a test but did not encountered the problem you mentioned:
1\Add a HtmlText control (HtmlText_QR) and set it's HtmlText property to:
"<img src=https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=Hello%20world&choe=UTF-8>"
2\Add a button and set it's OnSelect property to
Office365Outlook.SendEmail(User().Email,"Your QRcode is attached", HtmlText_QR.HtmlText,{IsHtml:true});
The Result:
In addition,I noticed that the error message in your screenshot is that the service is not responding.I suggest you check the network connection or change the device to test.
Best Regards,
Bof
Hi @v-bofeng-msft ,
Appreciate your response. Myqr is collection to store the image.
I have tried your code it is sending email with QRCode but I need to pass the value in the qrcode URL string.
In your url string you hard coded hello world. Our requirement is to pass the text string entered by user
Example in HTML area
"<img src=https://ddec1-0-en-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2fchart.googleapis...." &textfield - Returns empty qr code
Hi @azhicon :
Do you want to convert dynamic characters into QR codes?
I've made a test for your reference:
1\Add a text input control(TextInput2)
2\Set HtmlText_QR's HtmlText property to
"<img src=https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=Hello%20world"&TextInput2.Text&"&choe=UTF-8>"
3\Button's OnSelect
Office365Outlook.SendEmail(User().Email,"Your QRcode is attached", HtmlText_QR.HtmlText,{IsHtml:true});
Best Regards,
Bof
Hi @v-bofeng-msft ,
It is working if my text input field is in the same screen. If my text input screen is in previous screen it is not working. But I am still able to refer the field in the code but value is missing in the QR code image. Anything I am missing?
Hi @azhicon :
The values of controls and global variables can be referenced across screens.The situation you said may be because you called a context variable.I suggest that you can save the data in a global variable, and then call this global variable in your second screen.
Best Regards,
Bof
Hi @v-bofeng-msft,
It is also textinput field if I refer in other fields it is working not sure why it is not working in htmlarea.
May I know how to assign text input value to global variable?
Hi @azhicon :
I've made a test but it worked well.
If the problem persists, I suggest you save the value of textinput into a global variable.For example:
Set TextInput2's OnChange property to:
Set(thevar,TextInput2.Text)
In this way, as long as the input in TextInput2 changes, the changed value will be saved in the variable thevar.
Best Regards,
Bof
Hi @v-bofeng-msft ,
I found the issue if I use functions to populate value it is not getting passed in to HTML area. If we use manually typed text it is getting passed . This is applicable even if I use global, context variables.
Below is the function I am using to populate text field
Office365Users.UserProfile(User().Email).GivenName
I have 8 text fields which populate job title, postal code,... from Active directory
Any other solution?
User | Count |
---|---|
161 | |
96 | |
76 | |
72 | |
59 |
User | Count |
---|---|
213 | |
166 | |
97 | |
95 | |
77 |