cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Community Champion
Community Champion

Re: sending email with condition

Update @MKMUMU ,

I am looking in the wrong area for the issue - you need the Office365Outlook Connector (not Office365Users).

Go to View > Data Sources and type Outlook in the search and connect. It all should work then.

View solution in original post

Highlighted
Helper II
Helper II

Re: sending email with condition

Thanks a lot @WarrenBelz .....It was really a great help from you.....

Highlighted
Community Champion
Community Champion

Re: sending email with condition

No problem @MKMUMU ,

Glad to help.

Highlighted
Helper II
Helper II

Re: sending email with condition

Hi @WarrenBelz ,

I want to seek another suggestion from you..

Can you guide me on my previous topic "Sending email with condition"? I wanted to send email to multiple recipients, what should i do to add multiple recipient?

 

I had thought of adding column in the collection and concat those email column in the sendEmailButton. Can you guide me through this? 

Highlighted
Community Champion
Community Champion

Re: sending email with condition

Hi @MKMUMU ,

If for instance you have the recipients selected in a multi-choice combo box and a field in the data set driving this box is called MailAdd, then in the To area of the Office365Outlook connector, where you put the mail address, you would have something like

Concat(
   YourComboBoxName.SelectedItems, MailAdd & "; "
)

This would put all the email address fields with a separator and space after them as required by Outlook. If you want to get rid of the last ;, it is a bit more complex, but this should work

With(
    {
        SendMail: Concat(
            YourComboBoxName.SelectedItems,
            MailAdd & "; "
        )
    },
    Left(
        SendMail,
        Len(SendMail) - 2
    )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Highlighted
Helper II
Helper II

Sending Email to multiple recipients

Hi @WarrenBelz ,

Actually i wanted to add predefined multiple user in the collection list. For selecting one department will send mail to those user.Can i add more column (MailAdd1,MailAdd2....etc) in my "colEmails" collection in my below code and add those column name in the "Sendemail" button in the place of "MailAdd"?

Can you guide me how can i incorporate these multiple recipients to get the email in this case?

App-->OnStart 

ClearCollect(
colEmails,
{
Dept: "IT",
MailAdd: "IT@xxx.com"
})

EmailSubmitButton-->On Select

Office365Outlook.SendEmail(
Lookup(
colEmails,
Dept = areadrop.Selected.Value,
MailAdd
),
"Subject content here",
"Body content here"
)

 

Highlighted
Community Champion
Community Champion

Re: Sending Email to multiple recipients

OK @MKMUMU ,

Assuming you are going to hard-code this bit at App OnStart and end up with a collection of all emails with their related department

ClearCollect(
   colEmails,
   {
      Dept: "IT",
      MailAdd: "IT@xxx.com"
   }
)

 You then want to send the email to all the people in a selected Department (assume from a drop-down)
So then in the mail send

Office365Outlook.SendEmail(
   With(
      {
         SendEmail: 
         With(
            {
               vEmail: 
               Filter(
                  colEmails,
                  Dept = YourDropDownName.Selected.Department   //check the last bit
               )
            },
            Concat(
               vEmail,
               MailAdd & "; "
            )
         )
      },
      Left(
         SendEmail,
         Len(SendEmail) - 2
      )
   ),
   "Subject content here",
   "Body content here"
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Highlighted
Helper II
Helper II

Re: Sending Email to multiple recipients

Hi @WarrenBelz ,

Shouldn't i include those specific recipients in my collection list at first?Like this

ClearCollect(
colEmails,
{
Dept: "IT",
MailAdd1: "IT1@xxx.com",

MailAdd2: "IT2@xxx.com"
},
{
Dept: "Brand",
MailAdd1: "Brand1@xxx.com",

MailAdd2: "Brand2@xxx.com",

MailAdd:3 "Brand3@xxx.com"
}

)

If i add these users in the collection list,then how i will decide whom to keep in the send to and whom to keep in the cc of the email?

please bear with my pestering for a while...😐

Highlighted
Community Champion
Community Champion

Re: Sending Email to multiple recipients

HI @MKMUMU ,

Sorry, my assumption (note the hard-coding comment) was that you would do this and the example was just for one item.

Your structure however is a little different to what I envisaged - you do not need the Mail1/Mail2/Mail3 - the syntax I supplied will find all email addresses under the Department selected in a drop-down (so you can have as many as you want).

You could also have a reference list that you would use the same lookup on, which would be much easier to maintain.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Highlighted
Helper II
Helper II

Re: Sending Email to multiple recipients

Hi @WarrenBelz ,

I am feeling really a little bit ashamed that i did not fully understand your reply...Can you please explain elaborately to a novice learner like me?

Let me add my scenario for your better understanding, so that it will be easier for you to help me:

##when specific department is selected from a dropdownlist, i want to send email to multiple recipients ,

some recipients will be in the Email-->To,

some recipients will be in the Email-->cc. 

 

I want to give my heartiest thanks to you for putting effort with my powerapps learning😀😊

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (11,110)