iPhone 的邮件发送框架
我想从带有自定义 UI 的 iPhone 应用程序发送带有附件的电子邮件。我可以用什么来实现这个目的?
UPD:也许可以使用一些 smtp 库来完成此任务?你有什么建议?
I want to send emails with attachments from my iphone application with custom UI. What can i use for this?
UPD: maybe it's possible to use some smtp library for this task? What can you advice?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
你需要执行以下操作
首先通过右键单击项目添加一个框架。
添加->现有框架->
库/框架/MessageUI.framework
然后是
在ViewController.h文件中
ViewController.m文件
you need to do the following
first add a framework by right clicking on project.
Add -> Existing Framework ->
library/frameworks/MessageUI.framework
then
in ViewController.h file
ViewController.m file
您需要在自己的 SMTP 服务器中进行编译,网上有一些可以使用的服务器。这是一堆伤害。只需使用 iPhone 的标准消息编辑器即可。除非您正在构建一个电子邮件垃圾邮件客户端,否则这不会真正起作用。
You will need to compile in your own SMTP server, there are a few online that work. This is a pile of hurt. Just use the iPhones Message Composer which is standard. Unless you are building a email spam client this wont really work.
如果您想在不使用本机邮件编辑器 UI 且不设置自己的 SMTP 服务器的情况下发送电子邮件,您可以查看 PostageApp (http: //postageapp.com/)。有一个 iOS / Mac API 包装器,可让您通过 API 发送电子邮件。 https://github.com/postageapp/postageapp-objc
(披露:我为 PostageApp 工作,开发了该插件。)
If you want to send email without using the native mail composer UI and without setting up your own SMTP server, you can check out PostageApp (http://postageapp.com/). There's an iOS / Mac API wrapper that lets you send email through the API. https://github.com/postageapp/postageapp-objc
(Disclosure: I work for PostageApp and developed the plugin.)
开源
third20
框架通过模仿原始邮件应用程序的TTMessageController
设计了自己的邮件功能。您可以使用它作为起点,然后只需修改 UI它符合您的需求。不过,通过电子邮件发送附件是另一回事...
更多信息:http://www. Three20.info/overview< /a>
The open source
three20
framework has designed it's own Mail capabilities viaTTMessageController
which mimics the original Mail app..You can use that as a starting point and then simply modify the UI of it to your needs.E-mailing attachments is another story though...
More information: http://www.three20.info/overview