3
我已经打开Outlook应用程序并在其中发送文件。我能够打开Outlook并设置为,主题和正文,但不知道如何在路径附加文件中的文件目录 该文件是如何在Outlook中以编程方式快速添加附件3
var paths = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)
let documentsDirectory = paths[0]
let fileName = "supportdata.log"
let logFilePath = (documentsDirectory as NSString).appendingPathComponent(fileName)
let scheme : String = "ms-outlook://[email protected]&subject=Support data &body=Please find the attached file"
if let url = URL(string: scheme) {
UIApplication.shared.open(url, options: [:], completionHandler: {
(success) in
if (success)
{
print("Open \(scheme): \(success)")
}
})
}
请参阅此链接以获取正文中的附加图片:https://stackoverflow.com/a/44098422/4876245 – Hiren
您可以将上传文件的链接/网址附加到谷歌驱动器中,作为补救措施而不是文件本身 – SACn