Tyroner
Aspiring developer
Profile
Posts: 175
Reg: Dec 26, 2012
Johannesburg, S...
4,200
10/21/17 03:26 AM (7 years ago)

Send Email Plugin

This plugin is supposed to be downloaded with the Core but is not present when I download project. I get error message that says it is a third party plugin and was not downloaded.
 
tompos
Veteran developer
Profile
Posts: 127
Reg: Oct 19, 2013
Würzburg
7,370
like
10/21/17 02:28 PM (7 years ago)
Hi, are you talking about iOS or Android? In iOS, a screen with a BT_sendEmail type is not handled by a separate plugin (and corresponding .h and .m files). Instead, it is handled in BT_viewController.m //send email or share email if([[theScreenData itemType] isEqualToString:@"BT_screen_email"] || [[theScreenData itemType] isEqualToString:@"BT_sendEmail"] || [[theScreenData itemType] isEqualToString:@"BT_shareEmail"] || [[theScreenData itemType] isEqualToString:@"BT_screen_shareEmail"]){ if([appDelegate.rootDevice canSendEmails]){ //trigger the email method [self sendEmailWithScreenData:theScreenData imageAttachment:nil imageAttachmentName:nil]; It calls sendEmailWithScreenData, which in turn calls MFMailComposeViewController... so everything is covered in this part of the source code. I get an error message only when I run the code in the simulator (Email not supported - Sending email is not supported on this device)... so the error message tells the reason. Are you familiar with the debug mode in Xcode? Using breakpoints (e. g. at the source code mentioned above) may help to understand the problem. Best wishes Thomas
 
Tyroner
Aspiring developer
Profile
Posts: 175
Reg: Dec 26, 2012
Johannesburg, S...
4,200
like
10/23/17 07:48 PM (7 years ago)
Hi Thomas I'm talking about iOS. I think we are talking about two different things. The code you mention is for sending emails in general. like for example if you use the Share Menu Plugin. The Send Email plugin is something different. It makes it possible to repopulate the email address, the subject as well as content to the email. When I download my project Xcode looks for the Plugin and I then get a message saying that the plugin was not downloaded. It is one of David's Plugins and should be downloaded automatically.
 
tompos
Veteran developer
Profile
Posts: 127
Reg: Oct 19, 2013
Würzburg
7,370
like
10/23/17 11:09 PM (7 years ago)
... I think we are talking exactly about the same kind of screen... (BT_sendEmail). Perhaps you can have a look into the JSON-screendata for that screen. It should be something like {"itemId":"CC52BA658F9D8FE8992CBB2", "itemType":"BT_sendEmail", "itemNickname":"Email", "emailSubject":"question about your app...", "emailToAddress":"[email protected]"}, ... or do you have a different "itemType" for your screen? Perhaps the JSON-data is from an earlier version of your app where such an additional plugin-file was needed...? Do you work in a self-hosted environment? It sounds a bit as if something would be out of sync... In my control panel that type of screen allows to set the subject and email address, but not the message. An easy test might be to generate another screen of the same type and see how this turns into the JSON data of your app... and have a look at the debugger... and of course see whether all components are up-to-date... Thomas
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.