Reputation: 71007
Is it possible to embed images an email being sent from my app? Can we have an tag with source as an image in our app?
Thanks.
Upvotes: 1
Views: 2567
Reputation: 32632
The short answer is that you can't.
The long answer - I just came across this which includes the TTMessageController class. You'd need to add a delegate to actually do the sending though - i.e. implement SMTP and talk to a known SMTP server. That's not too complicated in itself, but adds some complications regarding error handling, particularly because there's no background processing.
For example, if your app exits before you've sent the email then you'll need to remember your state and send it next time you start up. The Apple mail application would just send it in the background.
Upvotes: 0
Reputation: 17170
Yes. Using 3.0's mail APIs you can.
I'll not put the code here because it is under the NDA. It is well documented in the SDK though. You need to get the image data into an NSData which is not as obviously documented:
NSData* imageData = UIImagePNGRepresentation(myUIImage);
Upvotes: 1