Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CTCoreMessage *msg = [[CTCoreMessage alloc] init];
- CTCoreAddress *from = [[CTCoreAddress alloc] initWithName:@"Hardik Ruparel" email:@"hardik988@gmail.com"];
- [msg setTo:[NSSet setWithObject:from]];
- [msg setFrom:[NSSet setWithObject:from]];
- NSLog(@"%@",[NSSet setWithObject:@"hardik988@gmail.com"]);
- [msg setBody:@"Testing Body"];
- [msg setSubject:@"dshjksdsd"];
- CTCoreAttachment *attachment = [CTCoreAttachment alloc];
- [attachment initWithContentsOfFile:@"/Users/hr/test.txt"];
- [msg addAttachment:attachment];
- [CTSMTPConnection sendMessage:msg server:@"smtp.gmail.com" username:@"##@gmail.com"
- password:@"###" port:587 useTLS:YES useAuth:YES];
Add Comment
Please, Sign In to add comment