Is it possible to load a URL inside the body of MFMailComposeViewController
? If not, what is the efficient way where I can load this URL
(i.e. HTML) so I can load it in the mail body
?
You can load HTML into a MFMailComposeViewController like this:
MFMailComposeViewController *composer = [MFMailComposeViewController new];
[composer setSubject:@"HTML test"];
[composer setMessageBody:@"<html><body><h1>Test</h1></body></html>" isHTML:YES];
However, you can't load an externally hosted website into it. You would have to fetch the HTML document and modify it, so that the links to the assets (images, scripts etc.) are absolute and include the protocol and hostname of the remote host (where you downloaded the website). You then could set this modified source code as the composer's messageBody
.