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