How can i send an email with an attachment (either local file or a file in the intranet) using outlook 2010?
<a href="mailto:[email protected]?subject=my report&body=see attachment&attachment=c:\myfolder\myfile.txt">
doesn't seem to work.
Attach a file to a message Create a message, or for an existing message, click Reply, Reply All, or Forward. In the message window, on the Message tab, in the Include group, click Attach File. Browse to and click the file that you want to attach, and then click Insert.
You can inject HTML code into the message body via the Insert as Text option; tab Insert-> (Attach) File-> select the created htm-file-> press the down arrow on the Insert button-> Insert as Text.
Nope, this is not possible at all. There is no provision for it in the mailto:
protocol, and it would be a gaping security hole if it were possible.
The best idea to send a file, but have the client send the E-Mail that I can think of is:
mailto:
link that contains the URL to the uploaded file in the message body this is not possible in "mailto" function.
please go with server side coding(C#).make sure open vs in administrative permission.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With