function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jatin Sethi 26Jatin Sethi 26 

send user profile picture in email

I am using a visualforce email template. I need to send profile picture of a user in the email itself. I cannot store it in documents folder. How can i achieve this. As of now, I am getting a url which can be accessible from salesforce only
Khan AnasKhan Anas (Salesforce Developers) 
Hi Jatin,

Greetings to you!

Please refer to the below links which might help you further with the above requirement.

https://salesforce.stackexchange.com/questions/162202/displaying-users-profile-picture-dynamically-in-email-template

https://salesforce.stackexchange.com/questions/148473/add-user-profile-picture-to-visualforce-email-template

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
Jatin Sethi 26Jatin Sethi 26
Hi Anas,

Thanks for your reply...

i have tried both of the approaches...

With ConnectApi.Photo, I am not getting any error but getting broken image icon in email.

For smallphotourl, I am getting error Arguments cannot be null

Regards,
Jatin Sethi
Jatin Sethi 26Jatin Sethi 26
For small photo url,

I am gettting response [Status=Moved Temporarily, StatusCode=302]
body =null