I have this code for showing some content in emailMessageBody. The code is given below.
var emailViewController : MFMailComposeViewController = MFMailComposeViewController()
emailViewController.mailComposeDelegate = self
emailViewController.setToRecipients(["----"])
emailViewController.setSubject("----")
emailViewController.setMessageBody("\n\n\n" + "-- \r\n " + "----- Device : \(self.deviceName), App Version : \(self.appVersion), Model : \(deviceModel) , iOS Version : \(self.deviceVersion), Country Code : \(self.countryCode), Localised Model : \(deviceLocalizedModel) \n \n \n", isHTML: true)
self.presentViewController(emailViewController, animated: true, completion: nil)
You guys see that i put "\n" in the content, but its not showing new lines in the emailBody. If anyone know how to get some new lines in emailMessageBody, Please help.
If you want to use
\nyou have to set the parameterisHTMLtofalsein thesetMessageBodycall, otherwise you must use</br>instead of\nwhen you set the content for the message body.