我正在尝试使用以下代码发送不带电子邮件(发送电子邮件而不显示界面)。
我还想在此电子邮件中附加图片。
这可能吗?
- (void) sendEmailTo:(NSString *)toStr withSubject:(NSString *)subjectStr withBody:(NSString *)bodyStr
{
NSString *emailString=[[NSString alloc] initWithFormat:@"mailto:?to=%@&subject=%@&body=%@",
[toStr stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding],
[subjectStr stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding],
[bodyStr stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:emailString]];
[emailString release];
}