有誰知道Interop.Domino.dll組件裡面的方法是什麼 意思嗎?

來源:互聯網
上載者:User

請教高手,一個棘手的問題:我用到了Interop.Domino.dll組件來發送Notes.Interop.Domino.dll組件裡有一個這樣的方法: NotesItem ReplaceItemValue(string pName, object Value);在襯實現發送時有用到。 有誰知道Interop.Domino.dll組件裡面的這個方法是什麼意思嗎?我想實現抄送功能,該怎麼擴展下面的函數代碼?

下面是發送郵件的函數: 

public void mail(string mail, string projectname) //發送 Mail     {         int id = Issue.MaxIssueId(); //擷取 IssueNo         string subject = getsubject(id); //擷取 subject         string body = getbody(); //擷取 body         string[] toarray = mail.Split(new char[] { ',' });          using (WinImpersonate im = new WinImpersonate(System.Configuration.ConfigurationManager.AppSettings["USERNAME"].ToString(), System.Configuration.ConfigurationManager.AppSettings["PASSWORD"].ToString(), WinImpersonate.DefaultDomain)) //設定許可權         {             try            {                string server = ConfigurationManager.AppSettings["lotus_server"];  // 擷取伺服器                string filepath = ConfigurationManager.AppSettings["lotus_filepath"]; //擷取資料庫的路徑                string password = ConfigurationManager.AppSettings["lotus_password"]; //擷取密碼                NotesSession objsession = new NotesSessionClass();                 objsession.Initialize(password); //初始化                NotesDatabase mydatabase = objsession.GetDatabase(server, filepath, false);  //執行個體化 DataBase                if (!mydatabase.IsOpen)                {                    mydatabase.Open();                }                Domino.NotesDocument mydocument;                Domino.NotesItem DomItem1;                Domino.NotesItem DomItem2;                Domino.NotesItem DomItem3;                Domino.NotesRichTextItem DomItem4;                Object recipients = toarray;                Object recipientsto = tomail;                if (tomail.Length == 0)                {                    Exception myexception = new Exception("You must provide some recipients");                    throw myexception;                }                mydocument = mydatabase.CreateDocument();                DomItem1 = mydocument.ReplaceItemValue("TO", toarray);                //DomItem2 = mydocument.ReplaceItemValue("CC", mail);                DomItem2 = mydocument.ReplaceItemValue("CC", toarray);                DomItem3 = mydocument.ReplaceItemValue("Subject", subject);                DomItem4 = mydocument.CreateRichTextItem("Body");                DomItem4.AppendText(body);                mydocument.Send(false, ref recipientsto);                      //發送mail                mydocument = null;                mydatabase = null;                objsession = null;            }             catch (Exception ee)             {                Response.Write("<script>alert('" + ee.Message + "');</script>");            }        }    }  

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.