Skip to content

Commit cf0ac33

Browse files
committed
Merge pull request phonegap#903 from guidosabatini/master
Readme files correction for both platforms plugins
2 parents 93ac6a6 + c74a9be commit cf0ac33

File tree

2 files changed

+32
-20
lines changed

2 files changed

+32
-20
lines changed

Android/EmailComposerWithAttachments/readme.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,29 @@
33
- Place the EmailComposer.js file somewhere in your www folder, and include it from your html.
44

55
- Add the plugin to your config.xml file in this way:
6+
67
<plugin name="EmailComposer" value="org.apache.cordova.EmailComposer"/>
78

89
Callable interface:
9-
window.plugins.emailComposer.showEmailComposerWithCallback(<callback>,<subject>,<body>,<toRecipients>,<ccRecipients>,<bccRecipients>,<isHtml>,<attachments>);
10+
11+
window.plugins.emailComposer.showEmailComposerWithCallback(callback,subject,body,toRecipients,ccRecipients,bccRecipients,isHtml,attachments);
1012

1113
or
12-
window.plugins.emailComposer.showEmailComposer(<subject>,<body>,<toRecipients>,<ccRecipients>,<bccRecipients>,<isHtml>,<attachments>);
14+
15+
window.plugins.emailComposer.showEmailComposer(subject,body,toRecipients,ccRecipients,bccRecipients,isHtml,attachments);
1316

1417
**ATTENTION:** the callback will never be triggered, it's here only for consistency with the iOS plugin
1518

1619
**Parameters:**
17-
- <callback>: never used
18-
- <subject>: a string representing the subject of the email; can be null
19-
- <body>: a string representing the email body (could be HTML code, in this case set <isHtml> to **true**); can be null
20-
- <toRecipients>: a js array containing all the email addresses for TO field; can be null/empty
21-
- <ccRecipients>: a js array containing all the email addresses for CC field; can be null/empty
22-
- <bccRecipients>: a js array containing all the email addresses for BCC field; can be null/empty
23-
- <isHtml>: a bool value indicating if the body is HTML or plain text
24-
- <attachments>: a js array containing all full paths to the files you want to attach; can be null/empty
20+
- callback: never used
21+
- subject: a string representing the subject of the email; can be null
22+
- body: a string representing the email body (could be HTML code, in this case set **isHtml** to **true**); can be null
23+
- toRecipients: a js array containing all the email addresses for TO field; can be null/empty
24+
- ccRecipients: a js array containing all the email addresses for CC field; can be null/empty
25+
- bccRecipients: a js array containing all the email addresses for BCC field; can be null/empty
26+
- isHtml: a bool value indicating if the body is HTML or plain text
27+
- attachments: a js array containing all full paths to the files you want to attach; can be null/empty
2528

2629
**Example**
30+
2731
window.plugins.emailComposer.showEmailComposerWithCallback(null,"Look at this photo","Take a look at <b>this<b/>:",["example@email.com", "johndoe@email.org"],[],[],true,["_complete_path/image.jpg", "_other_complete_path/file.zip"]);

iOS/EmailComposerWithAttachments/readme.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
This is a modification of the EmailComposer iOS plugin made by **Randy McMillan**
22
In this version of the plugin, you can attach images and PDF files to emails. A little refactoring was made.
33
It is compliant with Cordova 2.2.0 standard (new CDVInvokedUrlCommand parameter sent to native methods). If you want to use the plugin with an older version of Cordova you must comment the method
4+
45
showEmailComposer:(CDVInvokedUrlCommand*)command;
6+
57
and uncomment the method
8+
69
showEmailComposer:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
10+
711
both in EmailComposer.h and EmailComposer.m files
812

913
**IMPORTANT:** You will need to add MessageUI.framework to your project if it is not already included.
14+
1015
**IMPORTANT:** by now, you can attach only PDF and IMAGES (the latter will be convertend in PNG format)
1116

1217
- Add the EmailComposer.h EmailComposer.m files to your Plugins Folder.
@@ -16,22 +21,25 @@ both in EmailComposer.h and EmailComposer.m files
1621
- Add to Cordova.plist Plugins: key **EmailComposer** value **EmailComposer**
1722

1823
Callable interface:
19-
window.plugins.emailComposer.showEmailComposerWithCallback(<callback>,<subject>,<body>,<toRecipients>,<ccRecipients>,<bccRecipients>,<isHtml>,<attachments>);
24+
25+
window.plugins.emailComposer.showEmailComposerWithCallback(callback,subject,body,toRecipients,ccRecipients,bccRecipients,isHtml,attachments);
2026

2127
or
22-
window.plugins.emailComposer.showEmailComposer(<subject>,<body>,<toRecipients>,<ccRecipients>,<bccRecipients>,<isHtml>,<attachments>);
28+
29+
window.plugins.emailComposer.showEmailComposer(subject,body,toRecipients,ccRecipients,bccRecipients,isHtml,attachments);
2330

2431
**Parameters:**
25-
- <callback>: a js function that will receive return parameter from the plugin
26-
- <subject>: a string representing the subject of the email; can be null
27-
- <body>: a string representing the email body (could be HTML code, in this case set <isHtml> to **true**); can be null
28-
- <toRecipients>: a js array containing all the email addresses for TO field; can be null/empty
29-
- <ccRecipients>: a js array containing all the email addresses for CC field; can be null/empty
30-
- <bccRecipients>: a js array containing all the email addresses for BCC field; can be null/empty
31-
- <isHtml>: a bool value indicating if the body is HTML or plain text
32-
- <attachments>: a js array containing all full paths to the files you want to attach; can be null/empty
32+
- callback: a js function that will receive return parameter from the plugin
33+
- subject: a string representing the subject of the email; can be null
34+
- body: a string representing the email body (could be HTML code, in this case set **isHtml** to **true**); can be null
35+
- toRecipients: a js array containing all the email addresses for TO field; can be null/empty
36+
- ccRecipients: a js array containing all the email addresses for CC field; can be null/empty
37+
- bccRecipients: a js array containing all the email addresses for BCC field; can be null/empty
38+
- isHtml: a bool value indicating if the body is HTML or plain text
39+
- attachments: a js array containing all full paths to the files you want to attach; can be null/empty
3340

3441
**Example**
42+
3543
window.plugins.emailComposer.showEmailComposerWithCallback(function(result){console.log(result);},"Look at this photo","Take a look at <b>this<b/>:",["example@email.com", "johndoe@email.org"],[],[],true,["_complete_path/image.jpg"]);
3644

3745
**Return values**

0 commit comments

Comments
 (0)