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 Apps
Unanswered

SendEmail Issue

(0) ShareShare
ReportReport
Posted on by 5,345 Moderator

I placed a 'mail' icon in a Gallery.

 

I am attempting to use the formula below to send an email with specific data from the Gallery to an employee.

 

I'm getting a message that includes every item in the Gallery (without line breaks, which I thought I was adding with the 'Char(10)'), rather than ONLY the items in section in which I click the icon.

Office365.SendEmail("Wyl_E_Coyote@acme.com", "Even Contact Email",
Concat(EventbyStatusGallery.AllItems,
"Event Name:" & ThisItem.Title & Char(10) & "Company Name:" & ThisItem.CompanyName & Char(10) & "Immediate Need" & ThisItem.ImmediateNeed & Char(10)))


Phineas_0-1648826314915.png

Phineas_1-1648827505108.png

 

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    You specify EventbyStatusGallery.AllItems. That's why it will send all items. Just removing it will probably do the trick.

    Office365.SendEmail("Wyl_E_Coyote@acme.com", "Even Contact Email",
    "Event Name:" & ThisItem.Title & Char(10) & "Company Name:" & ThisItem.CompanyName & Char(10) & "Immediate Need" & ThisItem.ImmediateNeed & Char(10))

  • Phineas Profile Picture
    5,345 Moderator on at

    Edited: I got it!

    Office365Outlook.SendEmailV2("blahblah@acme.com", "Even Contact Email",
    "Event Name: " & ThisItem.Title & Char(10) &
    "Company Name: " & ThisItem.CompanyName & Char(10) &
    "Immediate Need: " & ThisItem.PSMImmediateNeed & Char(10))

    However, I still can't get the line spacing between each item. How is this achieved?

     

     

     

    This returns everything, with no line breaks (I'd like the line breaks, too).

    Office365Outlook.SendEmailV2("BlahBlah@email.com", "Even Contact Email",
    Concat(Collection,
    "Event Name: " & ThisItem.Title & Char(10) &
    "Company Name: " & ThisItem.CompanyName & Char(10) &
    "Immediate Need: " & ThisItem.PSMImmediateNeed & Char(10)))

    This, removing everything - as suggeted, returns error - "The function 'Concat' has some invalid arguments."

    Office365Outlook.SendEmailV2("BlahBlah@email.com", "Even Contact Email",
    Concat(
    "Event Name: " & ThisItem.Title & Char(10) &
    "Company Name: " & ThisItem.CompanyName & Char(10) &
    "Immediate Need: " & ThisItem.PSMImmediateNeed & Char(10)))

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    You don't need the concat, because you will only use 1 item.

    I've had some issues with the Char(10) as well once.

    What I would suggest is to put it in as HTML, so like below:

     

    Office365Outlook.SendEmailV2("BlahBlah@email.com", "Even Contact Email",
    Concatenate("<p>Event Name: " & ThisItem.Title & "<br>" &
    "Company Name: " & ThisItem.CompanyName & "<br>" &
    "Immediate Need: " & ThisItem.PSMImmediateNeed & "</p>")

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 234 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
timl Profile Picture

timl 122 Super User 2026 Season 2

Last 30 days Overall leaderboard