web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to send an email t...
Power Apps
Unanswered

How to send an email to the Person or group feild.

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have multiple person or group  field in an application as follows:

 

Employee details

Manager details

Trainer details. 

 In this i wanted to send an email to the field "Employee details" Currently I m using the Onselect property of a a submit button a form to Office365Outlook.SendEmail(sharepoint name. Employee details.Email, "Subject", Hi "& sharepoint name. Employee details.displayname&" Welcome onboard"). But this is giving me some error. can you help me to correct this and help me to use a send email function based on the employee details feild and also in the body in the opening of the email it must include the Display name of the employee details. 

 

Thanks

Priya

Categories:
I have the same question (0)
  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @Priyasantra ,
    Please try to check like below.

    //if People User Field Allow multi select Option.
    Office365Outlook.SendEmailV2(First(ThisItem.Candidate.Email).Email,"Send mail through Gallery Icon Button","Hi"&Text(First(ThisItem.Candidate.DisplayName).DisplayName));
    
    //If peope Field allow only single value selection.
    Office365Outlook.SendEmailV2(ThisItem.MyUser.Email,"Send mail through Gallery Icon Button","Hi"&ThisItem.MyUser.DisplayName&"Rest og the Body content goes here");

    VijayTailor_0-1601833452401.png

     

    Thanks,
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."



  • mdevaney Profile Picture
    29,991 Moderator on at

    @Priyasantra 

    What error message are you receiving?  This info is usually important to solving the problem.  Suggest you share it here.

     

    In the meantime I would suggest you try using SendMailV2 instead.  Let me know if this works.

     

    Office365Outlook.SendEmailV2(
     'sharepoint name'. 'Employee details'.Email,
     "Subject",
     Hi "& 'sharepoint name'. 'Employee details'.DisplayName&" Welcome onboard"
    )

     

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

  • Priyasantra Profile Picture
    Microsoft Employee on at

    Hi @mdevaney  I have tried this but it gives an error as follows

     

    Priyasantra_1-1601895525101.png

     

    It tells your function sendemail has invalid arguments

     

    My requirement is when i click the submit button it should send out an email to the "Employee details" and also the opening of the email must have the display name of the employee in the email body as follows 

     

    Priyasantra_2-1601895697360.png

    Please assist

    Regards

    Priya

  • Priyasantra Profile Picture
    Microsoft Employee on at

    Hi @VijayTailor 

     

    I have tried your method but your method doesn't have an option to select Thisitem itself. It says the same error. Also if I type manually it gives me the error as invalid arguments

     

    Priyasantra_0-1601895813873.png

     

    Can you help me with something else?

    Regards

    Priya

  • mdevaney Profile Picture
    29,991 Moderator on at

    @Priyasantra 

    Your problem is with this code.  It doesn't actually generate an email.  Replace it with some code that does or hardcode your own email as a test.

     

     

    'sharepoint name'. 'Employee details'.Email

     

     

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

     

  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @Priyasantra ,

    Collect the Data using variable and Instead of  Thisitem you can use varName.Email like that.
    if your doubt still not clarified then, please describe here How you getting data you showing in the Form / Inputs that you mentioned in Screenshot.


    Thanks,


  • Priyasantra Profile Picture
    Microsoft Employee on at

    Hi @mdevaney 

     

    Can you explain me what do you mean by hardcode? I am very sorry but I am very new to powerapp.

  • Priyasantra Profile Picture
    Microsoft Employee on at

    Hi @VijayTailor @mdevaney 

     

    Even this did not work. 

     

    The concept is very simple. I am creating an onboarding application. So in this My requirement is for the first form. I have a form as shown in the below screenshot. and a submit button associated with this form. All I wanted to to do is when I click on submit button it should submit the form and sends out the email to the "Employee details". Employee details is a person and a group feild. The data source is a sharepoint list. And the other connectors I am using are "Outlook365users" and "Office365 users"

     

    Priyasantra_0-1601906507115.png

     

    Your help is much appreciated.

     

    Regards

    Priya

  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @Priyasantra ,

    As i understood , you are using the form and on Submit on Form, you are trying to sending mail.
    Please see the below demo how you collect email and send email to the Selected user in the people or group field.

    Due to size constrain uploading into Zip File.

    have a look into that, Hope your Issue reslove
     

  • Priyasantra Profile Picture
    Microsoft Employee on at

    Hi @VijayTailor 

     

    I see that currently you have a gallery. Will the same process work even if I dont use a gallery? I dont have a gallery  at this point.

     

    I am sorry to ask you multiple questions I am very new to powerapps and hence asking you about it.

     

    Regards

    Priya

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 477

#2
WarrenBelz Profile Picture

WarrenBelz 341 Most Valuable Professional

#3
11manish Profile Picture

11manish 317

Last 30 days Overall leaderboard