Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development > iPhone SDK Development - Advanced Discussion

Reply
 
LinkBack Thread Tools Display Modes
Old 10-02-2009, 09:24 AM   #1 (permalink)
Registered Member
 
Join Date: Jul 2009
Posts: 11
rkbang is on a distinguished road
Default How to add an UIImage to mail composer.

Hello all,

I am using mail composer available in 3.0 onwards. I want to insert an image (UIImage* ) in the composer. please note I dont want to attach it, I want to insert the image which I am getting from the database. Is there any tutorial or efficient method to do this.
rkbang is offline   Reply With Quote
Old 10-02-2009, 04:30 PM   #2 (permalink)
Daddy Cool
iPhone Dev SDK Supporter
 
MarkC's Avatar
 
Join Date: Mar 2009
Location: Yorkshire, England
Age: 100
Posts: 1,616
MarkC is on a distinguished road
Default

Plenty of info online, I would tell you but I am drunk at a wedding. Google plus this site have the answer you need

hic
MarkC is offline   Reply With Quote
Old 10-03-2009, 12:45 PM   #3 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 79
ieasyproductions is on a distinguished road
Default

Quote:
Originally Posted by rkbang View Post
Hello all,

I am using mail composer available in 3.0 onwards. I want to insert an image (UIImage* ) in the composer. please note I dont want to attach it, I want to insert the image which I am getting from the database. Is there any tutorial or efficient method to do this.
I don't think there is a difference between inserting it and attaching it. When you attach an image I am pretty sure it puts it into the actual email. Not sure though
__________________
iEncourage - Premier Encouragement App for iPhone/iPod Touch
iSleepWell- Premier Sleep Tracking App for iPhone/iPod Touch

iEasyProductions - "Simple, Yet Refined"
ieasyproductions is offline   Reply With Quote
Old 10-03-2009, 02:37 PM   #4 (permalink)
Beast Mode
 
Join Date: Dec 2008
Age: 21
Posts: 1,971
Bertrand21 is on a distinguished road
Default

It puts the image in the email body
__________________
Haters gonna Hate
Likers gonna Like
Bertrand21 is offline   Reply With Quote
Old 10-06-2009, 01:37 PM   #5 (permalink)
Registered Member
 
Join Date: Jul 2009
Posts: 11
rkbang is on a distinguished road
Default

Quote:
Originally Posted by Bertrand21 View Post
It puts the image in the email body
It does put the image but at the end of the email.

I want to use HTML to format the place of image. Like I want to send a list of image along with the names infront of the images.
rkbang is offline   Reply With Quote
Old 10-06-2009, 11:07 PM   #6 (permalink)
Registered Member
 
Join Date: Sep 2008
Posts: 17
saidev is on a distinguished road
Default

Quote:
Originally Posted by rkbang View Post
It does put the image but at the end of the email.

I want to use HTML to format the place of image. Like I want to send a list of image along with the names infront of the images.
I actually wrote some code to do that awhile back, this is before 3.0 so there might be new enhancement I don't know about with the mail composer. But I believe the new mail composer new major feature was the attachment which you don't want.

Basically, you convert your image to base64 (the base64 attached below have to be shorten cause of the message length limit, so it's not a valid image) string and embed in the image tag. I remember I've stop working on this is because the embedded image(s) are only viewable from iPhone to another iPhone, I remember testing it with Gmail, our work Outlook client with no luck display the image, when I view source the data is there. So I don't think is the so much of a spam filter issue but email clients are just smarter. While I was research this, I actually found that this is how many spammers to blast out emails with image only info so it by passes the spam filter. Damn spammers, I was going to use it for good cause but since it was pretty much useless when I found out that most mail client won't display the image. For what it's worth, here is the code.

Code:
NSString *eMailBody = @"<html>Just convert your image file to base64 to embed into the email<img src="data:image/gif;base64,R0lGODlhFAFuAPcAAPf39//7/+fn59bT1u/r787Lzq0UAN7b3hhFrRhJtRA0hBA8lMYYALWytffz94wQAMa+vb26vRhNxufj5+/v78bDxvfz772+vcbHxghRCM7PzggkYyFZ1tYkCNbX1hhRzpyenO+6AN7f3gBlANauAGOW7zFl1kp95wg8pbW2tZyanHOi797f5zlx3msMAAB9CP/PAL22va2mraWipedJMSlRtf91Y72WAFqK76WmpRBFta2qrcaeAK2urfdpUuc8If39/e9ZQmPTY94wGFrLWrUkEISq9/n5+ZR5ABCWGLWOAIRpAGNRAClJlK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EBBpVIkgUhyg22nWocxKJLeEMBYIEAqVSD"></html>";
	NSString *encodedBody = [eMailBody stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
	NSString *urlString = [NSString stringWithFormat:@"mailto:someone@someplace.com?subject=ImageTest&body=%@", encodedBody];
	NSURL *url = [[NSURL alloc] initWithString:urlString];
	[[UIApplication sharedApplication] openURL:url];
saidev is offline   Reply With Quote
Old 06-14-2010, 12:52 AM   #7 (permalink)
iPhone Developer
 
Join Date: May 2009
Location: India
Age: 25
Posts: 79
AmitSrivastava is on a distinguished road
Send a message via Skype™ to AmitSrivastava
Unhappy attachment image

[quote=rkbang;130146]Hello all,

I am using mail composer available in 3.0 onwards. I want to attach an image to mail composer ,,,i dere ny one to let me know ..wats the complete process(till now i hav converted it to bnary first).....now dnt no wat to do
AmitSrivastava is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 362
8 members and 354 guests
.Snipe, BSH, givensur, guusleijsten, HemiMG, NSString, Paul Slocum, SillyHoney
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,645
Threads: 94,111
Posts: 402,862
Top Poster: BrianSlick (7,990)
Welcome to our newest member, leighec68
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:26 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0