コード例 #1
0
        private static void SendMailToPeers(IEnumerable<UserProfile> peers, int reviewId, UserProfile owner)
        {
            var smtpClient = new SmtpClient();
            foreach (var peer in peers) {
                var message = new MailMessage("*****@*****.**", peer.EmailAddress)
                              	{
                              		Subject = "Provide Review",
                              		Body = GetMailBodyForStartedReview(peer.UserName, reviewId, owner)
                              	};

                smtpClient.Send(message);
            }
        }
コード例 #2
0
        private static string GetMailBodyForStartedReview(string userName, int reviewId, UserProfile owner)
        {
            return string.Format(
                @"Hi there, {0},

            you have been invited by {2} ({3}) to provide a review.

            This helps improve your team's and your own performance.

            Please visit the following link to provide the review:

            http://teamreview.teamaton.com/Review/Provide/{1}

            If you would like to find out more about TeamReview, feel free to visit http://www.teamreview.net/.

            In case you have any questions, just reply to this email and we will get in touch with you as soon as possible.

            Thank you for your time and cheers,

            Andrej - Masterchief Head of Design of TeamReview.net
            ",
                userName, reviewId, owner.UserName, owner.EmailAddress);
        }