mirror of
https://github.com/status-im/react-native-mail.git
synced 2026-08-31 03:31:13 +00:00
Merge pull request #29 from geldarhb/master
Added support for CC and BCC recipients
This commit is contained in:
@@ -53,6 +53,16 @@ RCT_EXPORT_METHOD(mail:(NSDictionary *)options
|
||||
[mail setToRecipients:recipients];
|
||||
}
|
||||
|
||||
if (options[@"ccRecipients"]){
|
||||
NSArray *ccRecipients = [RCTConvert NSArray:options[@"ccRecipients"]];
|
||||
[mail setCcRecipients:ccRecipients];
|
||||
}
|
||||
|
||||
if (options[@"bccRecipients"]){
|
||||
NSArray *bccRecipients = [RCTConvert NSArray:options[@"bccRecipients"]];
|
||||
[mail setBccRecipients:bccRecipients];
|
||||
}
|
||||
|
||||
if (options[@"attachment"] && options[@"attachment"][@"path"] && options[@"attachment"][@"type"]){
|
||||
NSString *attachmentPath = [RCTConvert NSString:options[@"attachment"][@"path"]];
|
||||
NSString *attachmentType = [RCTConvert NSString:options[@"attachment"][@"type"]];
|
||||
|
||||
Reference in New Issue
Block a user