We are writing an application in Delphi XE2/Firemonkey for IOS (to run on an IPad) We need to be able to create an email witn an attachment from within the application. We have tried to use the Indy components but they do not work on IOS. Is there anyway we can do this in Delphi or do we have to resort to writing the app in Xcode?
Asked
Active
Viewed 1,643 times
5
-
I saw mention of the solution using iOS go past in my twitter stream, so the solution is out there! – mj2008 Oct 06 '11 at 14:32
-
I already did it for OSX with Indy... so, this should be possible with IOS... – Whiler Oct 06 '11 at 14:50
-
Ok.. I tried.. and... Fatal: Can't find unit IdMessage used by main, so this can't be achieved with Indy... – Whiler Oct 06 '11 at 15:03
-
1@Whiler, you seem to have made a big jump in logic there. The error message just says it can't find a common Indy unit. That merely suggests you don't have Indy installed properly for the compiler to find it. It's a big step to go from there to the conclusion that Indy won't work. – Rob Kennedy Oct 06 '11 at 17:52
-
1@Whiler: Indy does not support iOS yet. That has nothing to do with the IdMessage error, though. That is separate. – Remy Lebeau Oct 06 '11 at 19:42
-
Have you seen this question?: http://stackoverflow.com/questions/310946/how-can-i-send-mail-from-an-iphone-application – Johan Oct 06 '11 at 21:48
-
@Johan: I mentioned that link in my answer. :) – Ken White Oct 07 '11 at 01:01
3 Answers
6
Indy doesn't work on iOS. See this SO question.
There's a thread on the Embarcadero Delphi Firemonkey forums about this very topic. In it, it's suggested you use the iOS MessageUI framework, and refers to this SO question for an example.
1
Sending an email from an iOS FireMonkey application

Francis Lee
- 975
- 8
- 23
-
@Francis, hard to say if will be possible to attach the file there, because the `mailto` protocol doesn't support it. It's just the e-mail clients who parsing the `&Attachment` keyword and attach the file to the message. +1 anyway – TLama Oct 06 '11 at 15:26
-
2On StackExchange, good answers actually contain the answer (it's appropriate to reference the source, of course, but providing *only* a link is not a good answer). – Argalatyr Oct 06 '11 at 17:30
-
That article doesn't describe *sending* an e-mail. It describes constructing a URL that some other application decides to handle, which may or may not result in the construction and sending of e-mail. If you want your application to really send e-mail, then your application will establish an SMTP connection (either through Indy, or some other way). – Rob Kennedy Oct 06 '11 at 17:55