Skip to content

Instantly share code, notes, and snippets.

@mronge
Created October 15, 2012 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mronge/3893098 to your computer and use it in GitHub Desktop.
Save mronge/3893098 to your computer and use it in GitHub Desktop.
MailCore Example
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