tschoffelen / react-native-email-link

📭 Open an email client from React Native (for 'magic link' type functionality).
MIT License
412 stars 74 forks source link

Influence list of email clients on iOS #111

Closed Daidalos117 closed 7 months ago

Daidalos117 commented 2 years ago

Hello, I noticed that the list of email clients is hardcoded in the code of the library. But we want to add some email clients used in our country. I could make a PR with changes necessary for rewriting the list, I was thinking something easy like:

let prefixes = {
  "apple-mail": "message://",
  gmail: "googlegmail://",
  ...
}

const setPrefixes = (newPrefixes: typeof prefixes) => prefixes = newPrefixes;

Same for titles and uriParams vars. and then on our side just

setPrefixes({custom: 'szn-email://'})
...
openInbox();

Would this be suitable for you, or do you prefer us making our own fork and implementing that there? Thank you in advance!

tschoffelen commented 2 years ago

Good idea! We could also add this as an option to the openInbox method:

openInbox({
   title: 'What email app do you want to open?',
   additionalPrefixes: {
       ...
   }
});

Or, also always happy of course to add new email apps as default options to the library! The more the merrier!

Daidalos117 commented 2 years ago

Sounds good! What would you prefer? Possibility to add additional data or just adding new ones to library? Honestly I don't have an opinion on this 😅

tschoffelen commented 2 years ago

Adding new ones to the library would be best I think, has direct added value for other users of the lib

Daidalos117 commented 2 years ago

Good point 👍 I have created a PR. But I wanted to ask, how do you got to know what path is app using for opening a compose view? Did you contact the authors of the email clients? @tschoffelen

tschoffelen commented 2 years ago

Just a lot of googling and experimenting for most of them...

github-actions[bot] commented 7 months ago

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] commented 7 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale. Please feel free to re-open if you feel this issue is still relevant.