0
내 앱에 HTML이 삽입되어 있으며 앱에서 이메일로 보내고 싶습니다. 아래 코드를 설정하고 이메일의 텍스트를 이메일로 보내지만 첨부 된 이미지는 첨부하지 않습니다. 나는 이것이 baseURL을 올바르게 설정하지 않았기 때문이라고 생각하지만 emailBody를 위해 어떻게해야하는지 잘 모르겠습니다. 이견있는 사람? 이 전송 한 후iOS 이메일 HTML BaseURL
NSString *htmlFile = [[NSBundle mainBundle] pathForResource:@"Thanks" ofType:@"html"];
NSString* htmlString = [NSString stringWithContentsOfFile:htmlFile encoding:NSUTF8StringEncoding error:nil];
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
[picker setSubject:@"A prayer gift of thanks to you"];
// Set up recipients
NSArray *toRecipients = [NSArray arrayWithObject:@"[email protected]"];
[picker setToRecipients:toRecipients];
// Fill out the email body text
NSString *emailBody = htmlString;
[picker setMessageBody:emailBody isHTML:YES];
가 자신의받은 이메일 본문에 이미지가 표시되지 않는'친구 @의 example.com'? –
메일 피커 컨트롤러에서보기 만하면됩니다. 또한 서명 줄의 절반을 잘라냅니다. – user717452