Trigger a mail from another mail body on clicking link

后端 未结 1 1606
有刺的猬
有刺的猬 2021-01-27 09:09

Step 1: I have a requirement like On clicking a button in my Application, Mail should be triggered to respective person in To list.

相关标签:
1条回答
  • 2021-01-27 09:37
    Outlook.Application app = new Outlook.Application ();
    Outlook._MailItem mailItm = ( Outlook._MailItem)app.CreateItem ( Outlook.OlItemType.olMailItem );
    mailItm.To = "xxx@xxx.com";
    mailItm.Cc = "yyy@yyy.com";
    mailItm.Subject = "Some Subject";
    // body, bcc etc...
    mailItm.Display ( true );
    

    If you are clicking on a link to send email with filling (To, Subject, Cc, etc.,) without using asp.net, you can do something like following using mailto:

    <a href="mailto:xxx@xxx.com?Subject=Some%20Subject&Cc=yyy@yyy.com>
    Click here to send mail
    </a>
    
    0 讨论(0)
提交回复
热议问题