102
Views
9
Comments
Send/Read Emails from O365 in ODC
Application Type
Reactive

I need help to understand how to set up/configure my app to be able to send/read emails from O365. I am having trouble finding a step by step guide. Does anybody have any suggestions? Im am using ODC.
I am a novice, bare with me, and thank you :)

Best Regards, Kim.

2024-12-02 13-16-47
Vipin Yadav

Hi Kim,

I have included a couple of links below that serve as a guide for the configuration process. These resources should assist you in understanding how to set up and send emails within ODC platform. 

For Email Configuration:

  1. https://success.outsystems.com/documentation/outsystems_developer_cloud/building_apps/emails/
  2. https://success.outsystems.com/documentation/outsystems_developer_cloud/managing_outsystems_platform_and_apps/configure_emails/

For Sending Emails: 

  1. https://success.outsystems.com/documentation/outsystems_developer_cloud/building_apps/emails/sending_emails/

Thanks,

Vipin Yadav

UserImage.jpg
Kim Agersand

I followed the links and was able to send an email with "hard coded" text to a test list, set up in the portal.
Now I'm wondering what I need to do so that the user that is logged in is the sender of the email, instead of the one setup in the portal.

2024-12-02 13-16-47
Vipin Yadav

Hello Kim,

You may enter the sender's email address in the "From" field, and in the "To" section, you can specify the customer's email address or any other intended recipients.

I have included a screenshot below for your reference. Please review it and let me know if you need any further information or assistance.


Thanks,

Vipin Yadav

UserImage.jpg
Kim Agersand

I am unable to get a functional expression to get a hold of current users email.

2024-12-02 13-16-47
Vipin Yadav

If you wish to retrieve the logged-in user's email ID, please follow the steps outlined below:

  1. Query the User entity using an Aggregate, and within this Aggregate, apply a filter on the User.Id column using the GetUserId() function. 

I have included a screenshot below for your reference. Please review it and let me know if you need any further information or assistance. 

 


Thanks,

Vipin Yadav

UserImage.jpg
Kim Agersand

Ok, it is now working...thank you so much! :)
Next problem is that it is only the user, who has the same email as we configured with in the odc portal, that can send emails.
Is it possible to have more emails in the portal or how would you suggest we solve this?

Thnk you so much for your help! :)

2024-12-02 13-16-47
Vipin Yadav


On the portal, you can add only one email address; however, when sending an email, you can include multiple email IDs in the 'To' or 'From' sections.

To resolve your issue, please follow the steps below:

  1. Get all email IDs.
  2. Use the String_Join function, where you can pass a list and a separator ";". This function will return a string value.
  3. Pass this string value in the 'To' section of your emails.

I have added a screenshot below for your reference. Please check it and let me know if you have any questions.


2024-12-18 16-06-42
Junaid Syed

Hello Kim,

There is a forge component available to integrate with Office 365 email for O11. You might want to explore this and get the idea how the integration works, then replicate similar approach for ODC.

https://www.outsystems.com/forge/component-overview/12494/read-office365-email-o11

Hope it helps!

Junaid

2024-09-25 11-22-45
IVIahdi

Hi Kim,

Setting up your app to send/read emails from O365 can be a bit tricky at first. Here’s a simplified guide to help you:

1. Register your app in Azure AD: Go to the Azure portal, register your application, and note down the Client ID and Tenant ID.

2. Configure API permissions: Grant the necessary permissions for sending and reading emails (e.g., Mail.Read, Mail.Send).

3. Set up authentication: Use OAuth 2.0 to authenticate your app with the Client ID, Tenant ID, and Client Secret.

4. Integrate with O365: Use Microsoft Graph API to send and read emails.

For detailed steps, you might want to check the official Microsoft documentation or OutSystems forums.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.