Discussion Forums  >  Uncategorized

Replies: 5    Views: 165

Mackimack
Apple Fan
Profile
Posts: 481
Reg: Dec 30, 2010
Sweden
14,310
10/26/11 12:18 AM (14 years ago)

launch_emailDocument?

Hi all. I'm about to build a new app, where you can send jokes via email. I want to appens name will be included in the email + file. example: This is sent from a funny app. includes Funny_joke_1.html
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
10/26/11 01:38 AM (14 years ago)
If you're asking about attaching documents to emails...have a look at the sendEmailWithScreenData method in the BT_viewController.m file. It shows how an image is turned into NSData then attached to a message. The same logic will be used to attach a .html file that you embedded in the project or downloaded, saved, then attached. Oh, wait. Have a look at the BT_screen_webView.m file. It already does exactly this...attach a file then call the sendEmailWithScreenData method I mentioned above. Look at line 807 or so in the webView.m file and get a look at how it's looking for a document to attach, creating the tmpAttachmentData (NSData Object) to pass to the email method.
 
Stefan
buzztouch Evangelist
Profile
Posts: 558
Reg: Dec 21, 2010
Sweden
14,780
like
11/01/11 11:43 AM (14 years ago)
@Mackimack - har du lyckats med detta? Skulle behöva få lite direktiv. Har en app där jag vill kunna attacha dokument precis som du beskriver. Får inte det att funka. BR/Stefan
 
Mackimack
Apple Fan
Profile
Posts: 481
Reg: Dec 30, 2010
Sweden
14,310
like
11/01/11 11:53 AM (14 years ago)
Tja Stefan. Jag har inte hunnit att sitta med det ännu. Jag kommer att göra det under denna vecka. Jag hör av mig om jag löser detta. Jag kommer nog att höra av mig till dig ang android hjälp.
 
Stefan
buzztouch Evangelist
Profile
Posts: 558
Reg: Dec 21, 2010
Sweden
14,780
like
11/01/11 12:13 PM (14 years ago)
ok. låter bra!
 
Mackimack
Apple Fan
Profile
Posts: 481
Reg: Dec 30, 2010
Sweden
14,310
like
11/02/11 03:47 AM (14 years ago)
Hej Stefan. now I have solved the problem. You do this if you want, for example, attach a text that says this message was sent from my app You can also attach an image, for example, app icon. Go to -> BT_viewControllerManager.m scroll down to 807, Below this line: MFMailComposeViewController * picker = [[[MFMailComposeViewController alloc] init] auto release]; picker.mailComposeDelegate = theNavController; This lines can you paste in. [picker setSubject:@You have to see this...]; // Attach an image to the email NSString *path = [[NSBundle mainBundle] pathForResource:@app_icon ofType:@png]; NSData *myData = [NSData dataWithContentsOfFile:path]; [picker addAttachmentData:myData mimeType:@image/png fileName:@app_icon.png]; // Fill out the email body text NSString *emailBody = @Send from my-app.....; [picker setMessageBody:emailBody isHTML:NO]; Hope it solves your problem. Hör av dig om du inte fixar det.
 

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.