Created
October 15, 2012 15:29
-
-
Save mronge/3893098 to your computer and use it in GitHub Desktop.
MailCore Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CTCoreMessage *msg = [[CTCoreMessage alloc] init]; | |
CTCoreAddress *toAddress = [CTCoreAddress addressWithName:@"Monkey" | |
email:@"monkey@monkey.com"]; | |
[msg setTo:[NSSet setWithObject:toAddress]]; | |
[msg setBody:@"This is a test message!"]; | |
NSError *error; | |
BOOL success = [CTSMTPConnection sendMessage:testMsg | |
server:@"mail.test.com" | |
username:@"test" | |
password:@"test" | |
port:587 | |
connectionType:CTSMTPConnectionTypeStartTLS | |
useAuth:YES | |
error:&error]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment