嘗試是這樣的 - >
MailMessage theMailMessage = new MailMessage("[email protected]", "[email protected]");
theMailMessage.Body = "body email message here";
theMailMessage.Attachments.Add(new Attachment("pathToEmailAttachment"));
theMailMessage.Subject = "Subject here";
SmtpClient theClient = new SmtpClient("IP.Address.Of.Smtp");
theClient.UseDefaultCredentials = false;
System.Net.NetworkCredential theCredential = new System.Net.NetworkCredential("[email protected]", "password");
theClient.Credentials = theCredential;
theClient.Send(theMailMessage);
好了,根據您的修改和額外的信息,我發現這篇博文是由Jon Galloway,"Sending files via the default e-mail client"。
這看起來像你可能要找的東西,雖然我沒有用這種方式宣稱任何知識,因爲我一直使用我發佈的方法。
希望它對您有用。
類似的帖子在這裏 - > http://stackoverflow.com/questions/1195111/c-mailto-with-attachment – 2010-02-05 04:32:38