如何使用mime快速使用和发送电子邮件 [英] how to use and send email using mime in swift

查看:139
本文介绍了如何使用mime快速使用和发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是swift的新手,正在使用swift 2.2版.

I am new to swift and i am using swift version 2.2.

我想使用迅速的哑剧发送电子邮件.为此,我已经通过此链接

I want to send an email using swift mime. For this, I have go through this link

http://swiftmailer.org/docs/messages.html

但是我不能在我的快速代码中使用require_once 'lib/swift_required.php'.

But I can not use require_once 'lib/swift_required.php' in my swift code.

如何在osx swift项目中使用它?

How can I use this in my osx swift project?

推荐答案

Apple的

Apple's SBSendEmail Framework is documented with a sample project. The interface for the Controller class includes a sendEmailMessage: method.

@property(retain, readwrite) NSTextField *toField;
@property(retain, readwrite) NSTextField *fromField;
@property(retain, readwrite) NSTextField *subjectField;
@property(retain, readwrite) NSTextField *fileAttachmentField;
@property(retain, readwrite) NSTextView *messageContent;

- (IBAction)sendEmailMessage:(id)sender;
- (IBAction)chooseFileAttachment:(id)sender;

通读文档并下载示例项目进行试用.

Read through the documentation and download the sample project to try it out.

这篇关于如何使用mime快速使用和发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆