iphone:通过外部服务器(使用 PHP 脚本)从我的应用程序发送电子邮件是否合法
我想知道从我的应用程序发送电子邮件的最佳解决方案是什么。
我有两个解决方案: 1-使用 MFMailComposeViewController : 效果很好。便于使用。但使用大量 RAM:在活动监视器中,当我使用它时,RAM 分配从 ~10 Mo 增长到 ~20Mo,并且永远不会释放 2- 设置一个处理发送电子邮件的 PHP 脚本。 它也运作得很好。而且它使用的 RAM 非常少:使用此解决方案大约 3 Mo。
所以,我的问题是: 苹果允许这样做吗?
有人在他的应用程序中使用这个解决方案吗?
i wonder what is the best solution to send an email from my app.
I have two solutions :
1- using MFMailComposeViewController :
it works well. Easy to use. but use an huge amount of RAM : in activity monitor, when i use this, the RAM allocation grows from ~10 Mo to ~20Mo, and is never freed
2- Setup a PHP-Script that handles sending email.
it works very well too. And it uses very few RAM : around ~3 Mo with this solution.
So, my question is :
does this is allowed by apple ?
Does anyone is using this solution in his app ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我很确定苹果并不关心当人们使用你的应用程序时如何发送一些电子邮件。
更重要的问题是,当使用 MFMailComposeViewController 从设备发送时,您可以免费获得以下功能:
使用您自己的 php 脚本,您会得到:
看看这些事情,所提出的解决方案确实没有可比性。所以真正的问题是,发送什么样的电子邮件。是发送给您的反馈,还是代表用户发送的邮件?
内存问题对我来说是新的,我从未遇到过这样的问题。您是否以正确的方式处理内存管理?如果是这样,那就没什么好担心的了。如果您实际上没有遇到问题,请不要过多关注“活动监视器”。
I'm pretty sure apple doesn't care how some email gets sent out when people use your app.
The more important issue is that when sending from the device, using
MFMailComposeViewController
, you get the following for free:Using your own php script, you get:
Looking at these things, the proposed solutions are really not comparable. So the real question is, what kind of email is sent out. Is it feedback sent to you, or is it mail sent on behalf of the user?
The memory concerns are new to me, I never experienced such problems. Do you handle memory management the proper way? If so, there is nothing to worry about. Don't focus too much on the "activity monitor" if you're not actually experiencing problems.
我将在这里提出第三种选择。如果您想利用 Web 服务发送电子邮件,您可以利用现有的电子邮件服务,例如 PostageApp (http://postageapp.com/< /a>)。他们有一个库,您可以将其用作 iOS / Mac 应用程序的一部分,该应用程序与 API 接口,允许您从 Objective-C 发送电子邮件。您可以在此处查看该插件:
http://dev.postageapp.com/pages/plugins.html。利用这样的服务的好处是您不必担心发送电子邮件的内部结构,可以让您专注于您的应用程序。
(披露:我为 PostageApp 工作并构建了该插件)
I'll throw in a third alternative here. If you want to leverage a web service for emailing you could leverage an existing email service such as PostageApp (http://postageapp.com/). They have a a library you can use as part of your iOS / Mac app that interfaces with the API which allows you to send email from Objective-C. You can check out the plugin here:
http://dev.postageapp.com/pages/plugins.html. The nice thing about leveraging a service like this is you don't have to worry about the internals of sending email and lets you focus on your application.
(Disclosure: I work for PostageApp and built the plugin)