コード例 #1
0
        public async Task SendCashBookingSuccessfulEmailAsync(int bookingId)
        {
            try
            {
                var booking = await _context.Bookings
                              .Include(b => b.User)
                              .Include(b => b.Activity)
                              .Include("Activity.ActivityType")
                              .FirstOrDefaultAsync(m => m.Id == bookingId);

                var message = GetCashPaymentSuccessfulMail(booking);
                await _emailSender.SendEmailAsync(booking.User?.Email, $"{booking?.Activity?.ActivityType?.Name} Payment Successful", message);
            }
            catch (Exception e)
            { }
        }
コード例 #2
0
 private void SendCashBookingEmail(PaymentRequest request, Booking booking)
 {
     try
     {
         var message = _emailHelper.GetCashPaymentMail(booking);
         _emailSender.SendEmailAsync(request.Email, $"{booking?.Activity?.ActivityType?.Name} Booking Pending", message, true);
     }
     catch (Exception e)
     { }
 }