clive dancey
clive dancey

Reputation: 143

Add multiple recipients to MFMailcomposer torecepients: field - Xcode IOS

I have an existing program that enables me to 'tag' an email and add it to an ARRAY , I am then trying to use that ARRAY in my existing program and add it

array2 has had a group of email addresses added to it so consists of "[email protected],[email protected]"

NSArray *toRecipients = [NSArray addObjectToArray:array2]; 

[composer setToRecipients:toRecipients];

Please don't 'flame' my code or message as I am typing the above from memory

Upvotes: 0

Views: 604

Answers (2)

Anbu.Karthik
Anbu.Karthik

Reputation: 82766

MFMailComposeViewController *recipntNames = [[MFMailComposeViewController alloc] init];
NSArray *toRecipientsNames = [NSArray arrayWithObjects:@"[email protected]",@"[email protected]",nil];   
[recipntNames setToRecipients:toRecipientsNames];

or use this array2 is your NSMutableArray Name

NSArray *array = [array2 copy];

[recipntNames setToRecipients:toRecipientsNames];

need more reference use this link

Upvotes: 2

regetskcob
regetskcob

Reputation: 1191

I would recommend to you, that using [composer setToRecipients:array2] would be better :-)

Upvotes: 0

Related Questions