private void PošaljiKartu(Let let, Sjedalo sjedalo)
        {
            string rezervacijaId = RepozitorijSkyFlyReservation.DohvatiIdRezervacije(let, sjedalo).ToString();

            MemoryStream strmQR  = new MemoryStream();
            MemoryStream strmTem = new MemoryStream();

            Zen.Barcode.CodeQrBarcodeDraw barcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
            System.Drawing.Image          QRCode  = barcode.Draw(rezervacijaId, 50);
            QRCode.Save(strmQR, System.Drawing.Imaging.ImageFormat.Png);

            XImage QRImage = XImage.FromStream(strmQR);

            string putanja = AppDomain.CurrentDomain.BaseDirectory.Replace("\\bin\\Debug", "");

            Image template = Image.FromFile(putanja + "\\BoardingPass\\BoardingPassTemplate.png");

            template.Save(strmTem, System.Drawing.Imaging.ImageFormat.Png);

            XImage Template = XImage.FromStream(strmTem);

            PdfDocument pdf     = new PdfDocument();
            PdfPage     pdfPage = pdf.AddPage();
            XGraphics   graph   = XGraphics.FromPdfPage(pdfPage);

            graph.DrawImage(Template, 5, 5, 585, 225);
            graph.DrawImage(QRImage, 345, 50, 75, 75);

            XFont font = new XFont("Verdana", 8, XFontStyle.Bold);

            graph.DrawString($"{RepozitorijSkyFlyReservation.prijavljeniKorisnik.ImeKorisnika} {RepozitorijSkyFlyReservation.prijavljeniKorisnik.PrezimeKorisnika}", font, XBrushes.Black, new XRect(25, 72, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopLeft);
            graph.DrawString($"{let.PolazisniAerodrom.NazivAerodroma}", font, XBrushes.Black, new XRect(25, 110, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopLeft);
            graph.DrawString($"{let.OdredisniAerodrom.NazivAerodroma}", font, XBrushes.Black, new XRect(25, 150, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopLeft);
            graph.DrawString($"{let.AvionNaLetu.Aviokompanija.NazivAviokompanije}", font, XBrushes.Black, new XRect(182, 110, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopLeft);
            graph.DrawString($"{let.DatumPolaska.Date.ToString("dd. MMMM")}", font, XBrushes.Black, new XRect(182, 150, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopLeft);
            graph.DrawString($"{let.DatumPolaska.ToString("HH:mm")}", font, XBrushes.Black, new XRect(282, 150, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopLeft);

            graph.DrawString($"{RepozitorijSkyFlyReservation.prijavljeniKorisnik.ImeKorisnika} {RepozitorijSkyFlyReservation.prijavljeniKorisnik.PrezimeKorisnika}", font, XBrushes.Black, new XRect(448, 72, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopLeft);
            graph.DrawString($"{let.PolazisniAerodrom.NazivAerodroma}", font, XBrushes.Black, new XRect(448, 97, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopLeft);
            graph.DrawString($"{let.OdredisniAerodrom.NazivAerodroma}", font, XBrushes.Black, new XRect(448, 125, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopLeft);
            graph.DrawString($"{let.DatumPolaska.Date.ToString("dd.MM")}", font, XBrushes.Black, new XRect(448, 152, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopLeft);
            graph.DrawString($"{let.DatumPolaska.ToString("HH:mm")}", font, XBrushes.Black, new XRect(495, 152, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopLeft);

            graph.DrawString($"{let.BrojLeta}", font, XBrushes.Black, new XRect(25, 190, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopLeft);
            graph.DrawString($"{sjedalo.OznakaSjedala}", font, XBrushes.Black, new XRect(104, 190, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopLeft);
            graph.DrawString($"{let.DatumPolaska.Add(new TimeSpan(0, -45, 0)).ToString("HH:mm")}", font, XBrushes.Black, new XRect(282, 190, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopLeft);
            graph.DrawString($"{sjedalo.OznakaSjedala}", font, XBrushes.Black, new XRect(448, 182, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopLeft);
            graph.DrawString($"{let.DatumPolaska.Add(new TimeSpan(0, -45, 0)).ToString("HH:mm")}", font, XBrushes.Black, new XRect(495, 182, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopLeft);

            pdf.Save(putanja + "\\BoardingPass\\karta.pdf");
            pdf.Dispose();

            SmtpClient client = new SmtpClient("smtp.gmail.com", 25);

            client.UseDefaultCredentials = false;
            NetworkCredential cred = new NetworkCredential("*****@*****.**", "sj6IWP3o");

            MailMessage Msg = new MailMessage();

            Msg.From = new MailAddress("*****@*****.**");

            Msg.To.Add($"{RepozitorijSkyFlyReservation.prijavljeniKorisnik.EmailKorisnika}");

            Msg.Subject = "Potvrda kupnje karte";

            Msg.Body = $"Poštovani {RepozitorijSkyFlyReservation.prijavljeniKorisnik.ImeKorisnika} {RepozitorijSkyFlyReservation.prijavljeniKorisnik.PrezimeKorisnika},\n\n" +
                       $"Na osnovu provedene kupnje karte za sjedalo {sjedalo.OznakaSjedala} na letu {let.BrojLeta} | {let.PolazisniAerodrom.NazivAerodroma}->{let.OdredisniAerodrom.NazivAerodroma} šaljemo Vam kartu za let.\n" +
                       "Karta se nalazi u pdf-u koji ste primili u ovoj poruci.\n" +
                       "Kartu koju ste primili koristite prilikom prijave na aerodromu.\n" +
                       "Molimo Vas da provjeru karte izvršite najkasnije 45 min prije polaska.\n\n" +
                       "S poštovanjem,\n" +
                       "SkyFlyReservation";

            Msg.Attachments.Add(new Attachment(putanja + "\\BoardingPass\\karta.pdf"));

            client.Credentials = cred;

            client.EnableSsl = true;

            client.Send(Msg);
            client.Dispose();
        }