-1

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?

Phiter
  • 14,570
  • 14
  • 50
  • 84
Eric Ipsum
  • 723
  • 3
  • 10
  • 24
  • 3
    This "Swift Mailer" thing has nothing to do with Swift, Apple's programming language, it's for PHP. – Eric Aya Jul 18 '16 at 11:50
  • @EricD so is there any link or way to use mime in swift osx to send email ...... thanks – Eric Ipsum Jul 18 '16 at 11:59
  • can anyone give me a link how i can send email from my osx project usign swift ... i search a lot but no result found ... everything is on ios – Eric Ipsum Jul 18 '16 at 14:15

2 Answers2

2

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.

Oletha
  • 7,324
  • 1
  • 26
  • 46
0

Check this answer for emails on ios: https://stackoverflow.com/a/28963929/4687211, swift mailer is some php mailer not swift

Community
  • 1
  • 1
Lu_
  • 2,577
  • 16
  • 24