You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Open Mail is a Flutter package designed to simplify the process of querying installed email apps on a device and allowing users to open the email app of their choice.
@@ -7,20 +9,28 @@ This package is especially useful for developers who want to provide users with
7
9
8
10
If you just want to compose an email or open any app with a `mailto:` link, you are looking for [url_launcher](https://pub.dev/packages/url_launcher).
9
11
10
-
## Why Use Open Mail?
12
+
This Flutter package allows users to open their installed mail app effortlessly. It draws inspiration from similar packages, particularly [open_mail_app](https://pub.dev/packages/open_mail_app), and builds upon that foundation to provide an improved and streamlined experience.
11
13
12
-
• url_launcher allows you to open mailto: links but does not let you:
13
-
• Choose a specific email app.
14
-
• Query the list of available email apps.
15
-
• On iOS, url_launcher will always open the default Mail app, even if the user prefers another app like Gmail or Outlook.
16
-
• With Open Mail, you can:
17
-
• Identify all installed email apps.
18
-
• Allow users to select their preferred email app (if multiple options are available).
14
+
## Why Use Open Mail?
19
15
16
+
-`url_launcher` allows you to open `mailto:` links but does not let you:
17
+
- Choose a specific email app.
18
+
- Query the list of available email apps.
19
+
- On iOS, `url_launcher` will always open the default **Mail App**, even if the user prefers another app like Gmail or Outlook.
20
+
- With **Open Mail**, you can:
21
+
- Identify all installed email apps.
22
+
- Allow users to select their preferred email app (if multiple options are available).
20
23
21
24
## Setup
25
+
26
+
### Android
27
+
28
+
No additional configuration is required for Android. The package works out of the box.
29
+
22
30
### iOS Configuration
31
+
23
32
For iOS, you need to list the URL schemes of the email apps you want to query in your `Info.plist` file. Add the following code:
33
+
24
34
```
25
35
<key>LSApplicationQueriesSchemes</key>
26
36
<array>
@@ -37,15 +47,19 @@ For iOS, you need to list the URL schemes of the email apps you want to query in
37
47
```
38
48
39
49
Feel free to file an issue on GitHub for adding more popular email apps you would like to see supported. These apps must be added to both your app’s `Info.plist` and the source code of this library.
40
-
Please file issues to add popular email apps you would like to see on iOS. They need to be added to both your app's `Info.plist` and in the source of this library.
50
+
Please file issues to add popular email apps you would like to see on iOS. They need to be added to both your app's `Info.plist` and in the source of this library.
51
+
41
52
## Installation
53
+
42
54
Add the following to your `pubspec.yaml`:
55
+
43
56
```
44
57
dependencies:
45
58
open_mail: latest_version
46
59
```
47
60
48
61
Then, run the following command:
62
+
49
63
```
50
64
flutter pub get
51
65
```
@@ -122,17 +136,37 @@ class MyApp extends StatelessWidget {
122
136
```
123
137
124
138
## Key Features
125
-
1. ### Detect Installed Email Apps
126
-
• Automatically identifies email apps installed on the device.
127
-
2. ### Open Specific Email App
128
-
• Open a specific app based on user selection or app configuration.
129
-
3. ### Native Dialog Support
130
-
• On iOS, displays a dialog to let users pick their preferred app when multiple apps are installed.
139
+
140
+
1. Detect Installed Email Apps
141
+
142
+
- Automatically identifies email apps installed on the device.
143
+
144
+
2. Open Specific Email App
145
+
146
+
- Open a specific app based on user selection or app configuration.
147
+
148
+
3. Native Dialog Support
149
+
150
+
- On iOS, displays a dialog to let users pick their preferred app when multiple apps are installed.
131
151
132
152
## Support
133
-
Feel free to file issues on the GitHub repository for:
134
-
• Adding support for additional email apps.
135
-
• Reporting bugs or suggesting improvements.
153
+
154
+
Feel free to file issues on the [GitHub](https://github.com/Cuboid-Inc/open_mail) repository for:
This package is distributed under the MIT License. See the LICENSE file for details.
171
+
172
+
This package is distributed under the MIT License. See the [LICENSE](https://raw.githubusercontent.com/Cuboid-Inc/open_mail/main/LICENSE) file for details.
0 commit comments