WebDAV を使用して送信してみてください。あなたがそれを試してみたいなら、これが私の方法です..
public static void ViaWebDav(String sMailbox, String sExchange, String sTo, String sCc, String sSubject, String sBody, params String[] sAttachments)
{
HttpWebRequest hwrOut;
HttpWebResponse hwrIn;
//String strServer = "SXGM-202.xxx.com";
//string strPassword = "123";
//string strUserID = "u";
//string strDomain = "fg";
Byte[] b = null;
Stream s = null;
String sMailboxUrl = "http://" + sExchange + "/exchange/" + sMailbox;
String sMailboxSend = sMailboxUrl + "/##DavMailSubmissionURI##/";
String sMailboxTemp = sMailboxUrl + "/drafts/" + sSubject + ".eml";
// Construct the RFC 822 formatted body of the PUT request.
// Note: If the From: header is included here,
// the MOVE method request will return a
// 403 (Forbidden) status. The From address will
// be generated by the Exchange server.
StringBuilder sb = new StringBuilder();
sb.AppendLine("To: " + sTo);
if (!sCc.IsEmpty()) sb.AppendLine("Cc: " + sCc);
sb.AppendLine("Subject: " + sSubject);
sb.AppendLine("Date: " + System.DateTime.Now);
sb.AppendLine("X-Mailer: AML FIU;");
sb.AppendLine("MIME-Version: 1.0;");
sb.AppendLine("Content-Type: text/plain;");
sb.AppendLine("Charset = \"iso-8859-1\"");
sb.AppendLine("Content-Transfer-Encoding: 7bit;");
sb.AppendLine();
sb.AppendLine(sBody);
// Create a new CredentialCache object and fill it with the network
// credentials required to access the server.
//MyCredentialCache = new CredentialCache();
//MyCredentialCache.Add(new System.Uri(strMailboxURI),
// "NTLM",
// new NetworkCredential(strUserID, strPassword, strDomain)
// );
// Create the HttpWebRequest object.
hwrOut = (HttpWebRequest)HttpWebRequest.Create(sMailboxTemp);
hwrOut.Credentials = CredentialCache.DefaultCredentials;
hwrOut.Method = "PUT";
hwrOut.ContentType = "message/rfc822";
// Encode the body using UTF-8.
b = Encoding.UTF8.GetBytes(sb.ToString());
hwrOut.ContentLength = b.Length;
s = hwrOut.GetRequestStream();
s.Write(b, 0, b.Length);
s.Close();
// PUT the message in the Drafts folder of the mailbox.
hwrIn = (HttpWebResponse)hwrOut.GetResponse();
#region //ATTACHMENTS
//Do the PROPPATCH
sb = new StringBuilder();
sb.Append("<?xml version='1.0'?>");
sb.Append("<d:propertyupdate xmlns:d='DAV:'>");
sb.Append("<d:set>");
sb.Append("<d:prop>");
sb.Append("<isCollection xmlns='DAV:'>False</isCollection>");
sb.Append("</d:prop>");
sb.Append("</d:set>");
sb.Append("</d:propertyupdate>");
foreach (String sAttach in sAttachments)
{
hwrOut = (HttpWebRequest)HttpWebRequest.Create(sMailboxTemp);
hwrOut.Credentials = CredentialCache.DefaultCredentials;
hwrOut.Method = "PROPPATCH";
hwrOut.ContentType = "text/xml";
hwrOut.Headers.Set("Translate", "f");
b = Encoding.UTF8.GetBytes(sb.ToString());
hwrOut.ContentLength = b.Length;
s = hwrOut.GetRequestStream();
s.Write(b, 0, b.Length);
s.Close();
hwrIn = (HttpWebResponse)hwrOut.GetResponse();
hwrOut = (HttpWebRequest)HttpWebRequest.Create(sMailboxTemp + "/" + Path.GetFileName(sAttach));
hwrOut.Credentials = CredentialCache.DefaultCredentials;
hwrOut.Method = "PUT";
using (FileStream fs = new FileStream(sAttach, FileMode.Open, FileAccess.Read))
{
b = new Byte[fs.Length];
fs.Read(b, 0, (Int32)fs.Length);
}
hwrOut.ContentLength = b.Length;
s = hwrOut.GetRequestStream();
s.Write(b, 0, b.Length);
s.Close();
hwrIn = (HttpWebResponse)hwrOut.GetResponse();
}
#endregion
// Create the HttpWebRequest object.
hwrOut = (HttpWebRequest)HttpWebRequest.Create(sMailboxTemp);
hwrOut.Credentials = CredentialCache.DefaultCredentials;
hwrOut.Method = "MOVE";
hwrOut.Headers.Add("Destination", sMailboxSend);
hwrIn = (HttpWebResponse)hwrOut.GetResponse();
// Clean up.
hwrIn.Close();
}