Ejemplo n.º 1
0
        public static void SendReceipt(int userId, int basketId)
        {
            var basket = BasketServiceWrapper.Get(basketId);
            var user = UserServiceWrapper.GetUser(userId);

            var body = BuildReceiptBody(basket, user, basket.Total);
            var email = new Email
                            {
                                To = user.Email,
                                From = "*****@*****.**",
                                Subject = "Thank you for your purchase from Calliope",
                                Body = body
                            };
            EmailSenderWrapper.SendEmail(email);
        }
Ejemplo n.º 2
0
 public static void SendEmail(Email email)
 {
     const string url = "http://localhost/calliope/stub/email-sender/emails/";
     WebRequester.Post(url, email);
 }