cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JR-BejeweledOne
Super User
Super User

Email Address for MailTo:

This may seem like a very basic question but I am really struggling with it.   In my app I need to have a contact link that sends an email to a specific person.

 

I have it working using a label with the Launch feature in the OnSelect and everything 'hard coded' into the App.

 

I really need to be able to bring this Name/Email address in from an outside source so the Power App doesn't have to be modified if the person changes.    I am not using a SharePoint Person field for this.  For whatever reason, I can't seem to figure out the best way to accomplish this.

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
1 ACCEPTED SOLUTION

Accepted Solutions
JR-BejeweledOne
Super User
Super User

After much reading of various articles and trying different things, I have solved my issue.

 

My source list has a single column that contains the email address of the contact person.

 

I set the OnVisible property of the screen to set a variable with the contact information from my list.

 

OnVisible = Set(varContact, DataSource)

 

Then I have a TextInput field with the items value set to:

 

Items = First(varContact).Title

 

In order to send the email using the users default mail client I am using the Launch function for the OnSelect value.

 

OnSelect = Launch("mailto:" & TextInputContactInfo)



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

View solution in original post

5 REPLIES 5
KrishnaV
Super User
Super User

Hi @JR-BejeweledOne ,

 

Follow the below steps to achieve your needs: 

  1. Add a label and show the dynamic text
  2. Add a button on top of it and group both the controls
  3. Make the button transparent by removing the below properties
    HTML as Button1.png
  4. Now write send email functionality onSelect event of the button

 

 

Office365.SendEmail("Test3@xxxxxx.xxmicrosoft.com","Send email from PowerApps","Item: "&Concat(ComboBox1.SelectedItems,First_x0020_name&" "))​

 

 

I hope this resolved your issue if you see any challenge let me know I am always happy to help.

 

Regards,

Krishna
If this post helps, then please consider Accept it as the solution and give thumbs-up to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

I am not sure I understand what you are saying.    I have a SharePoint list that contains a number of different data options for my app.  I filter them based on a DataType column.

 

One of the entries is the Name and email address (Title and description column) of the person I need to show in the Send email link.

 

I am not getting this information from the Office 365 users connection, I already have it in my data source list.   

 

@KrishnaV 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

Hi @JR-BejeweledOne ,

 

Ok, I have implemented this below prototype, and let me know if that is not what you want no worries I will change up to your needs.

Follow the steps to achieve this at you:

  1. Add a custom card on the edit form
  2. Ensure that you set the item gallery.selected
  3. Now add the button to the custom card and a label to show the text as "User Email"
  4. Now onSelect event of the button add the below code

 

Office365Outlook.SendEmail(Email,Title  & "Button Click","This is a sample email from Power Apps")​

 

  • To this to work add Office365Outlook connector in you App
  • Now decorate the button to look like as a simple label

Let me know if this doesn't work I can show you the working model since it is too large in size I am not able to attach it here.

 

I hope this resolved your issue if you see any challenge let me know I am always happy to help.

Regards,

Krishna
If this post helps, then please consider Accept it as the solution and give thumbs-up to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

Thank you but this isn't what I am looking for.   If we ever need to change the contact person or add additional contact people we would need to edit the app which is what I am trying to avoid.

 

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
JR-BejeweledOne
Super User
Super User

After much reading of various articles and trying different things, I have solved my issue.

 

My source list has a single column that contains the email address of the contact person.

 

I set the OnVisible property of the screen to set a variable with the contact information from my list.

 

OnVisible = Set(varContact, DataSource)

 

Then I have a TextInput field with the items value set to:

 

Items = First(varContact).Title

 

In order to send the email using the users default mail client I am using the Launch function for the OnSelect value.

 

OnSelect = Launch("mailto:" & TextInputContactInfo)



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,211)