How many emails are sent in the moss program?

Source: Internet
Author: User
When we use the API in the. NET class library to send mail, We need to configure its SMTP server and so on, but in Sharepoint, we have provided the relevant encapsulation methods:
Sputility. sendemail (spweb, false, false, "to@mail.com", "mailtitle", "mailbody ");

The above method can only send mail in the form of to, sometimes we need to use CC, BCC, we can use another overload of this function to achieve:
Sputility. sendemail (Web, messageheaders, messagebody, appendfooter)

We need to set messageheaders,CodeAs follows:
Stringdictionary headers = new stringdictionary ();
Headers. Add ("to", "To@Mail.com ");
Headers. Add ("cc", "CC@Mail.com ");
Headers. Add ("BCC", "BBC@Mail.com ");
Headers. Add ("from", "From@Mail.com ");
Headers. Add ("subject", "The Mail title ");
Headers. Add ("Content-Type", "text/html ");

You can specify to cc bcc from in the header. Of course, the premise of using the above function is that you have configured the outgoing email settings in the management center.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.