cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jharville
Helper V
Helper V

"Combo Box" linked to O365 Users & AzureAD not sending email to selected address

I have a combo-box ("testComboBox") that is linked to AzureAD through the connector, which pulls the ID from a group in O365 Users and displays those users only. I have no errors in my code, but the email will not send. 

Office365Outlook.SendEmail(
    testComboBox.Selected.mail,
    varRecord.'Created By'.DisplayName & " Promo Submittal Request",
    varRecord.'Created By'.DisplayName & " has submitted a Promo Submittal request. Please click the link below to review. 
    <a href=""https://apps.powerapps.com/play/939ce2d2-f898-4dee-8f71-9b6da615ae1b?tenantId=aed03ef3-6bfe-4359-a193-2069aec0d8c8" & varRecord.ID &
    """>CLICK HERE</A>",
    {
        IsHtml: true,
        Importance: "Normal"
    }
);

Does anybody see anything in my code that is preventing the email from being sent? Thank you! 🙂

 

 

 

(Screenshot for reference)

 

jharville_1-1598469835110.png

 

 

8 REPLIES 8
WarrenBelz
Super User
Super User

Hi @jharville ,

I assume there is a valid email address in  testComboBox.Selected.mail.

You are also missing the syntax "?varxxx=" in your deep link hyperlink.

 

Hello and thank you for the response! I double checked and the email addresses are valid. Before this attempt, I used a drop-down (instead of the current combo-box) that was linked to a SharePoint list where users were stored (instead of the current O365 users storage), and the email sent successfully.

 

I had to switch to O365 Users storage since the SharePoint list was giving me problems later on in my code. All I did was replace the name of the past drop-down with the name of my current combo-box, and rename the attributes to match accordingly ( ex: testDropDown.Selected.Email --> testComboBox.Selected.mail ) . I'm wondering if the issue is the compatibility with O365 Users, as opposed to a SharePoint List...

Hi @jharville ,

If you do this

Office365Outlook.SendEmail(
    testComboBox.Selected.mail,
    "Test Subject",
    "Test Body"
)

does the mail send?

Hello, I tried it out, and there were no errors, but the email still didn't send. I suspect that the HTML wasn't the issue, but possibly rather the testComboBox linked to the AzureAD Connector to pull the O365 Users Group ID to pull the users? 

 

jharville_0-1598496569104.png

 

Thanks @jharville ,

Going a step further, if you put this on a label, what do you get?

testComboBox.Selected.mail

and what are the Items of the combobox?

 

The "Items" property of the combo-box, testComboBox  is: 

AzureAD.GetGroupMembers("9da2a20c-a33f-43cb-bbb5-6429fb515cd2").value

The parameter within the parentheses is the Group-ID that AzureAD is pulling from O365 Users.

 

Also, did you mean to create a Label and input that code into one of the properties? I put that code into the Text property of an empty Label, and nothing happened. 

 

Thank you! 

Hi @jharville ,

I was just confirming you got not values back. The issue is definitely your AD. I am not an Azure user, so do not know here to go from here.

No worries, I really do appreciate your help, it was very kind of you ! 🙂

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,641)