điều này không thể thực hiện được trong chức năng "mailto".
hãy đi với mã hóa phía máy chủ (C#). Hãy đảm bảo mở so với quyền quản trị.
Microsoft.Office.Interop.Outlook.Application oApp = new Microsoft.Office.Interop.Outlook.Application();
Microsoft.Office.Interop.Outlook.MailItem oMsg = (Microsoft.Office.Interop.Outlook.MailItem)oApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem);
oMsg.Subject = "emailSubject";
oMsg.BodyFormat = Microsoft.Office.Interop.Outlook.OlBodyFormat.olFormatHTML;
oMsg.BCC = "emailBcc";
oMsg.To = "emailRecipient";
string body = "emailMessage";
oMsg.HTMLBody = "body";
oMsg.Attachments.Add(Convert.ToString(@"/my_location_virtual_path/myfile.txt"), Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue, Type.Missing, Type.Missing);
oMsg.Display(false); //In order to displ
Nguồn
2017-03-02 06:10:57
Trong trường hợp này tôi có thể sử dụng dấu phẩy apache tôi nghĩ. – Benchik
không phải là xấu, nhưng sẽ có một nơi trên máy chủ, nơi tất cả các tập tin người dùng được đặt mà sẽ cần làm sạch theo thời gian bằng cách nào đó. Có lẽ [cách tiếp cận này sẽ làm việc cho điều đó] (http://stackoverflow.com/questions/5760969/php-how-to-delete-a-file-from-server-after-is-read-unlink-is-executed- befor) – ejectamenta