Siyali Gupta

Siyali Gupta started this conversation 5 months ago.

Is there a way to use the "ms-outlook://" URI in iOS to open a specific email message by ID?

Is there a way to use the ms-outlook:// URI scheme in iOS to open a specific email message by its ID, and what are the steps to implement this functionality?

codecool

Posted 5 months ago

Yes, you can use the ms-outlook:// URI scheme in iOS to open a specific email message by its ID. Here's how you can do it:

Steps to Open a Specific Email in Outlook App on iOS Construct the URI: Use the following format to construct the URI:

ms-outlook://emails/message/open?restID=<messageId>&immutableID=<immutableId>&account=<accountName> Replace <messageId>, <immutableId>, and <accountName> with the appropriate values for the email message you want to open.

Open the URL: Use the UIApplication.shared.open method to open the constructed URI from your iOS app.

Best Practices Ensure Correct Parameters: Double-check that the messageId, immutableId, and accountName are correct to avoid opening the wrong email.

Handle Errors Gracefully: Implement error handling to manage cases where the URL scheme is not supported or the email ID is incorrect.

By following these steps, you should be able to open a specific email message in the Outlook app on iOS using the ms-outlook:// URI scheme.