IOS 6 send email without user intervention

First of all, I am working on my own application, so I do not need approval in the App Store. I know that this will never be accepted, but this is a business rule in which our users use some content of the application, but with a default message and subject, so they cannot edit these fields.

Prior to iOS 5, I managed to navigate the hierarchy of views and allow fields to be indispensable. But with iOS 6 and mail to another process, I can no longer do this. I need to block the views for editing (I put the view on all mail viewing except the title bar and it works, but when the user tries to cancel the email, my view blocks the popover to delete or save the draft) or send emails without a user interface (I was able to do this with the code based on Stealth Messenger (https://github.com/0xced/Stealth-Messenger/) in iOS 4 or 5, but now it doesn’t "t).

I tried everything I could, with private APIs and Objective-C runtime. I can reject the submission submission email in order, but the email address itself is not sent.

Can someone help me? Has anyone done this?

Thanks in advance.

+4
source share
2 answers

Take a look at this: Send email in background from iOS

IOS does not support mail in the background. [...] Alternatively, you should implement a WebService for this [...]

Probably the best option is to use some server code and call it using NSURLRequest.

Hope this helps.

+4
source

I do this in my application. I have a simple PHP script on a web server that uses PearPHP mail modules to send SMTP mail. The PHP script accepts several incoming variables, for example $ toAddress, $ subject, $ message, and then connects to the SMTP server and sends mail.

Unfortunately, you are not allowed to subclass MFMailComposeViewController, and if you used some invisible UIView to lock the fields, this was just a workaround, which was probably broken. (They did the same with the ability to insert β€œ.” On the NumPad keyboard)

0
source

Source: https://habr.com/ru/post/1437227/


All Articles