tags:

views:

30

answers:

1

Hi,

I'm trying to send an SMS to a email address (e.g. [email protected]) as follow:

MFMessageComposeViewController *picker = [[MFMessageComposeViewController alloc] init];
picker.messageComposeDelegate = self;
picker.recipients = [NSArray arrayWithObjects:@"[email protected]", nil];

However, the email address gets trimmed/formatted in the SMS composer To: line as bellow: "myemailexample.com"

I want to see the exact string that I'm passing in the To line, does anyone have any suggestion why it trims the input string?

Thanks a lot,

-Mehrdad

+1  A: 

It's expecting a phone number, not an email address. From http://developer.apple.com/library/ios/documentation/MessageUI/Reference/MFMessageComposeViewController_class/Reference/Reference.html#//apple_ref/doc/uid/TP40009668-CH1-SW7:

Each string should in the array should contain the phone number of the intended recipient.

Robot K
The documentation really does contain "should" twice.
Robot K