我想從我的應用程序發送電子郵件,但直接出我的應用程序沒有打開模式電子郵件窗口。在應用程序電子郵件與科爾多瓦/ PhoneGap沒有打開模式電子郵件窗口
var args = {
subject: 'Subject',
body: 'message',
toRecipients: 'recipients'
};
cordova.exec(null, null, "EmailComposer", "showEmailComposer", [args]);
一個非常簡單的和好的方式:
我通過使用本機代碼,並呼籲通過科爾多瓦EXEC功能的模態電子郵件窗口和傳遞的參數,如發現了一些例子。
但我想直接從我的應用程序發送電子郵件,就像本地應用程序正在做它。
難道有人知道如何做到這一點還是沒人聽說過這樣的事情?
在此先感謝
伊夫
我想到了這個從http://stackoverflow.com/questions/6526363/error-using-the-code-from-mailcomposer-from-apple-sample你必須在你的項目中包含MessageUI.framework。 如果您使用的是Xcode 4: 選擇項目,然後突出顯示您的活動目標。 選擇「Build Phases」選項卡 展開「Link Binary With Libraries」 按'+'按鈕 選擇MessageUI.framework – DarkLord
但是您必須在您的cordova.plist中包含EmailComposer以及「您的目標」> Ressources> Cordova.plist - 在這裏插入插件。 Key:EmailComposer Value:EmailComposer。正如你可以看到[這裏](http://cl.ly/image/1A2m372K2o3L) – Yves