Hi there, I need to send profile picture of Manager in the email. I have Html text with a table and list of fields. Is it possible to get the profile picture of the manager to the email content (like a thumbnail in the body of the email and NOT as an attachment)
Any help is highly appreciated!
Authorising Manager Email : " &"" & UpdateRequestDropdown.Selected.'Authorising Manager'.Email &"" & "
" & "
Authorising Manager Title : " &"" & UpdateRequestDropdown.Selected.'Authorising Manager'.JobTitle &"" & "
" & "
Authorising Manager Division : " &"" & UpdateRequestDropdown.Selected.'Authorising Manager'.Department &"" & "
" & "
Authorising Manager Image : " &"" & UpdateRequestDropdown.Selected.'Authorising Manager'.Picture &"" & "
" & "
Authorising Manager Image : " &"" & Office365Users.UserPhotoV2( UpdateRequestDropdown.Selected.'Authorising Manager'.Email) &"" & "
"
==================================================================
The above code send the link for the image as below in the email:
Authorising Manager information:
Authorising Manager Name : XXXX XXXXX
Authorising Manager Email :XXXXX@t.com
Authorising Manager Title : Manager
Authorising Manager Division : Product Planning & Development
Authorising Manager Image : https://xxxxx/_layouts/15/UserPhoto.aspx?Size=L&AccountName=xxx.com
Authorising Manager Image : appres://blobmanager/d5be6112350a46f48d1724eddbb763f6/8
Authorising Manager Phone : +00000
Authorising Manager Pic : appres://blobmanager/d5be6112350a46f48d1724eddbb763f6/9
Solved! Go to Solution.
That's a really good workaround and thanks for let me know that everything works from your side!
and maybe you don't need the image field, have you tried this?
"<img src=" &JSON( Office365Users.UserPhotoV2(UpdateRequestDropdown.Selected.'Authorising Manager'.Email).Image,IncludeBinaryData)&"width='50'"&"height='50'"& ">"
hmm... that's right, you are using it in a text or html text, right? I created my code in the 'onselect' of a button (a behaviour property) and the conversion to a json works there
Hi, @victorcp ...
Nice to know you..
I am using that code, But got this result on my email:
What should I do?
Can you share your code? looks like there are extra cotas in it
Set(
varImage,
JSON(
Office365Users.UserProfileV2(User().Email),
IncludeBinaryData
)
);
Office365Outlook.SendEmailV2(
User().Email,
"Test",
"<p>My Photo: <img src='" & varImage & "'style='height:20px; width: 20px'</p>"
)
Here it is...
The problem is varImage is not an image. Change the 'Office365Users.UserProfileV2' to 'Office365Users.UserPhotoV2' and let me know if it works