Reputation: 535
I have read that In App SMS is finally supported in iPhone OS 4...look at here
I want to know that if it is also possible to send emails automatically without user's intraction if yes then how?.I mean while our application is running.
Upvotes: 1
Views: 1267
Reputation: 125
Here is the code for Email
NSString *recipients=[NSString stringWithFormat:@"mailto:[email protected][email protected]&subject=Hi"]; NSString *body=[NSString stringWithFormat:@"&body=How r u "];
NSString *email=[NSString stringWithFormat:@"%@%@",recipients,body];
email=[email stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:email]];
Upvotes: 0
Reputation: 36617
No, that's not possible with the official iPhone SDK.
You have to use MFMailComposeViewController
or [[UIApplication sharedApplication] openURL: @"sms:12345678"];
or send a text.
Upvotes: 2