Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

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

How can I use this in my osx swift project?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
136 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...