Hi, I found in google this lib to send email
https://github.com/phonegap/phonegap-...
Do you think it ́s possible to use in my project?
How?
Thanks in advance
Hi, I found in google this lib to send email
https://github.com/phonegap/phonegap-...
Do you think it ́s possible to use in my project?
How?
Thanks in advance
Hello! Let me check. I'll update.
You can use this plugin as well as any other PhoneGap plugin. Here is a description:
1) On Source tab in necessary folder create folder emailComposer and inside that folder file EmailComposer.java (from here https://raw.github.com/phonegap/phone...)
2) Replace line prepackage org.apache.cordova;/pre with the following
prepackage com.phonegap.plugins.emailComposer;/pre
3) Change config.xml file, add the following code:
pre<feature name="EmailComposer">
<param name="android-package" value="com.phonegap.plugins.emailComposer.EmailComposer"/>
</feature>/pre
4) Create new JS asset with content https://raw.github.com/phonegap/phone...
5) To test on button click run the following code:
prewindow.plugins.emailComposer.showEmailComposerWithCallback(null,"Look at this photo","Take a look at this:",["example@email.com", "johndoe@email.org"],[],[],true);/pre
Do you think it's valid for IOS too?
Hi Francisco,
I think yes: https://github.com/phonegap/phonegap-...
Sorry, not work.
Firefox give me this error: "ReferenceError: cordova is not defined"
in this line of EmailComposer.js
49 .. cordova.addConstructor(function() {
Maryna,
I have create a new application, and I follow your instructions, but I have the same result:
Uncaught ReferenceError: cordova is not defined EmailComposer.js:49
(anonymous function) EmailComposer.js:49
Hi Francisco,
This won't work on desktop browser. You should export your app as APK, install on device and test there.
Hi,
I test this in Android and it runs ok.
I have make the changes to IOS and it don't work. I see in the instructions that I have to add the - MessageUI.framework -.
¿How can I do it?
In IOS I did this:
Create a folder "emailComposer" in IOSmyprojectCordovaLibPlugins
Create two files: EmailComposer.h and EmailComposer.m
Modify config.xml and add: code <feature name="Plugin">
<param name="ios-package" value="CDVPlugin"/>
</feature>
<feature name="EmailComposer">
<param name="ios-package" value="EmailComposer"/>
</feature>
/code
Modify myproject-Info-.plist and add: code <key>EmailComposer</key>
<string>EmailComposer</string>
/code
Hello! You would need to export app to xCode and add MessageUI.framework manually.