Guest User

Untitled

a guest
Jul 19th, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. -(void)sendEmail {
  2.  
  3. // create soft wait overlay so the user knows whats going on in the background.
  4. [self createWaitOverlay];
  5.  
  6. //the guts of the message.
  7. SKPSMTPMessage *testMsg = [[SKPSMTPMessage alloc] init];
  8. testMsg.fromEmail = @"support@dsfaes.co.uk";
  9. // testMsg.toEmail = phone;
  10. testMsg.toEmail=@"manjinderr@gmail.com;
  11.  
  12. testMsg.relayHost = @"smtp.nman.co.uk";
  13. testMsg.requiresAuth = YES;
  14. testMsg.login = @"support@man.co.uk";
  15. testMsg.pass = @"nfsdxsdfswdrt";
  16. testMsg.subject = @"The Confirmation";
  17. testMsg.wantsSecure = YES; // smtp.gmail.com doesn't work without TLS!
  18.  
  19. // Only do this for self-signed certs!
  20. // testMsg.validateSSLChain = NO;
  21. testMsg.delegate = self;
  22. }
  23.  
  24. NSArray* recipientsArray = [NSArray arrayWithObjects:@"abc@abc.com",@"xyz@xyz.com",nil];
  25.  
  26. for(NSString* toEmailAddress in recipientsArray){
  27. [self sendEmail:toEmailAddress];
  28. }
  29.  
  30. -(void)sendEmail:(NSString*)_toEmailAddress {
  31. // create soft wait overlay so the user knows whats going on in the background.
  32. [self createWaitOverlay];
  33.  
  34. //the guts of the message.
  35. SKPSMTPMessage *testMsg = [[SKPSMTPMessage alloc] init];
  36. testMsg.fromEmail = @"support@dsfaes.co.uk";
  37.  
  38. testMsg.toEmail = _toEmailAddress;
  39. testMsg.relayHost = @"smtp.nman.co.uk";
  40. testMsg.requiresAuth = YES;
  41. testMsg.login = @"support@man.co.uk";
  42. testMsg.pass = @"nfsdxsdfswdrt";
  43. testMsg.subject = @"The Confirmation";
  44. testMsg.wantsSecure = YES; // smtp.gmail.com doesn't work without TLS!
  45.  
  46. // Only do this for self-signed certs!
  47. // testMsg.validateSSLChain = NO;
  48. testMsg.delegate = self;
  49. }
Add Comment
Please, Sign In to add comment