Not: C# Kodlaması Tarafında Html Kodlarının style özellikleri '' içerisnde yapılır. Oluşturulan Kodlardaki "" tırkaların tamamını dönüştürmek için Notepad kullanılabilir.. public void MailGonder() { MailMessage ePosta = new MailMessage(); ePosta.From = new MailAddress("info@caglayangrup.com.tr"); //ePosta.To.Add("bekircelik5858@gmail.com"); ePosta.To.Add("nmert@caglayangrup.com.tr"); ePosta.IsBodyHtml = true; ePosta.Priority = MailPriority.Normal; ePosta.Subject = "Mail Başlık Mutabakat..."; string HtmlBody = @"<div> <h3>Mukatabat</h3> <br /> <p style='font-weight:bold;font-size:20px;letter-spacing: -2px;font-family:Trebuchet MS' > Gönderen Firma: <i style='font-weight:bold;font-size:24px;font-family:Trebuchet MS;color:red' >SİVAS ÇAĞLAYAN GRUP BOYA İNŞ.TAH.MÜH.TİC. VE SAN. A.Ş.</i> </p> <span style='font-weight:bold;font-size:20px;letter-spacing: -2px;font-family:Trebuchet MS' >Sayın: <asp:Label ID='lblMusteri' runat='server' Text='ABC FİRMASI DENEME'></asp:Label></span> <div style='margin-top:30px'>BS formlarında karşılıklı mutabakatın sağlanması için firmanıza ait Satış bilgilerimiz aşağıda gösterilmiştir.<br /> <br /> <table border='0' style='color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; width: 525pt;' width='700'> <tr> <td style='font-family: arial, sans-serif; margin: 0px; padding: 0cm;'> <table border='1' class='m_664161131784176869MsoNormalTable' style='width: 528.75pt; border: 1.5pt outset;width:705px'> <tr style='height: 22.5pt;'> <td style='font-family: arial, sans-serif; margin: 0px; padding: 0cm; height: 22.5pt;'> <p class='MsoNormal' style='margin: 0px 0cm; font-size: 12pt; font-family: "Times New Roman", serif; text-align: center;'> <b><span style='font-size: 10pt; font-family: Arial, sans-serif;'>Dönem Yılı</span></b></p> </td> <td style='font-family: arial, sans-serif; margin: 0px; padding: 0cm; height: 22.5pt;'> <p class='MsoNormal' style='margin: 0px 0cm; font-size: 12pt; font-family: "Times New Roman", serif; text-align: center;'> <b><span style='font-size: 10pt; font-family: Arial, sans-serif;'>Dönem Ay</span></b></p> </td> <td style='font-family: arial, sans-serif; margin: 0px; padding: 0cm; height: 22.5pt;'> <p class='MsoNormal' style='margin: 0px 0cm; font-size: 12pt; font-family: "Times New Roman", serif; text-align: center;'> <b><span style='font-size: 10pt; font-family: Arial, sans-serif;'>Belge Adedi</span></b></p> </td> <td style='font-family: arial, sans-serif; margin: 0px; padding: 0cm; height: 22.5pt;'> <p class='MsoNormal' style='margin: 0px 0cm; font-size: 12pt; font-family: "Times New Roman", serif; text-align: center;'> <b><span style='font-size: 10pt; font-family: Arial, sans-serif;'>Tutar</span></b></p> </td> </tr> <tr style='height: 22.5pt;'> <td style='font-family: arial, sans-serif; margin: 0px; padding: 0cm; height: 22.5pt;'> <p class='MsoNormal' style='margin: 0px 0cm; font-size: 12pt; font-family: "Times New Roman", serif; text-align: center;'> <span style='font-size: 10pt; font-family: Arial, sans-serif;'>2018</span></p> </td> <td style='font-family: arial, sans-serif; margin: 0px; padding: 0cm; height: 22.5pt;'> <p class='MsoNormal' style='margin: 0px 0cm; font-size: 12pt; font-family: "Times New Roman", serif; text-align: center;'> Ay</p> </td> <td style='font-family: arial, sans-serif; margin: 0px; padding: 0cm; height: 22.5pt;'> <p class='MsoNormal' style='margin: 0px 0cm; font-size: 12pt; font-family: "Times New Roman", serif; text-align: center;'> Sayi</p> </td> <td style='font-family: arial, sans-serif; margin: 0px; padding: 0cm; height: 22.5pt;'> <p class='MsoNormal' style='margin: 0px 0cm; font-size: 12pt; font-family: "Times New Roman", serif; text-align: center;'> Para Birimi</p> </td> </tr> </table> </td> </tr> </table> <p style='margin-right: 0cm; margin-left: 0cm; font-size: 12pt; color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;'> </p> <p style='margin-right: 0cm; margin-left: 0cm; font-size: 12pt; color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;'> </p> <a href='http://' target='_blank'><img height='80' src='http://www.caglayangrup.com.tr/images/mut1.png' width='300' /></></a> <a href='http://' target='_blank'><img height='80' src='http://www.caglayangrup.com.tr/images/mut2.png' width='300' /></a></p> <p style='margin-right: 0cm; margin-left: 0cm; font-size: 12pt; color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;'> </p> <p style='margin-right: 0cm; margin-left: 0cm; font-size: 12pt; color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;'> <span style='font-family: Tahoma, sans-serif;'>Mutabakat Mektubunu indirmek için <a href='#'> Tıklayınız..</a></span></p> <p style='margin-right: 0cm; margin-left: 0cm; font-size: 12pt; color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;'> </p> <p style='margin-right: 0cm; margin-left: 0cm; font-size: 12pt; color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;'> <span style='font-family: Tahoma, sans-serif;'>Mutabakat veya İtirazınızı 30 gün içinde bildirmediğiniz takdirde T.T.K.'nun 94.maddesi gereğince bakiyede mutabık sayılacağımızı hatırlatırız. Bakiyede mutabık olmadığınız takdirde tarafımıza bir hesap ekstenizin gönderilmesini rica ederiz.</span></p> <p style='margin-right: 0cm; margin-left: 0cm; font-size: 12pt; color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;'> </p> <p style='margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;'> <span style='font-family: Tahoma, sans-serif;'>Teşekkürler,</span></p> <p style='margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: color: rgb(34, 34, 34); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;'> <br /> <span style='font-family: Tahoma, sans-serif;'>Tarafınıza gönderilen mutabakat ile ilgili sorularınız için : <a href='mailto:yozkul@caglayangrup.com.tr' style='color: rgb(17, 85, 204);' target='_blank'><strong><span style='font-family: Tahoma, sans-serif; color: rgb(0, 0, 170);'>yozkul@caglayangrup.com.tr</span></strong></a> veya <strong><span style='font-family: Tahoma, sans-serif; color: blue;'>(0346) 218 1858</span></strong><span style='color: blue;'> </span>No'lu telefondan bize ulaşabilirsiniz.</span></p> <br /> <span style='font-family: Cambria, serif; color: black;'>İYİ ÇALIŞMALAR…..</span> <p class='' style='margin: 0px; color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; background: white;'> <b><span style='font-size: 10pt; font-family: Cambria, serif; color: black;'> </span></b></p> <p style='margin: 0px;font-weight:bold;font-size: 10pt;'>Yunus ÖZKUL</p> <p style='margin: 0px;font-weight:bold;font-size: 10pt;'>Çağlayan Grup / Muhasebe</p> <p class='' style='margin: 0px; color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; background: white;'> <b><span style='font-size: 10pt; font-family: Cambria, serif; color: black;'> </span></b></p> <p style='margin: 0px; color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; background: white;'> <b><span style='font-weight:bold;font-size: 10pt; font-family: Cambria, serif; color: black;'>1.O.S.B. 3.kısım 5.Cd 13. sok. no:15</span><span style='font-size: 9pt; font-family: Cambria, serif; color: rgb(204, 0, 0);'><br /> </span><span style='font-weight:bold;font-size: 10pt; font-family: Cambria, serif; color: black;'>Tel : 0 346 218 18 58 - 0 532 139 40 34</span></b></p> <p style='margin: 0px; color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; background: white;'> <b><span style='font-weight:bold;font-size: 10pt; font-family: Cambria, serif; color: black;'>Faks: 0 346 218 18 40<br /> Mail : </span><span style='font-weight:bold;font-size: 10pt; font-family: Cambria, serif; color: blue;'><a href='mailto:yozkul@caglayangrup.com.tr' style='color: rgb(17, 85, 204);' target='_blank'><span style='color: blue;'>yozkul@caglayangrup.com.tr</span></a></span> <span style='font-weight:bold;font-size: 9pt; font-family: Cambria, serif; color: black;'><br /> Web <a href='http://www.caglayangrup.com.tr/' target='_blank'><span style='color: blue;font-weight:bold'>www.caglayangrup.com.tr</span></a></span></b></p> <p ><img src='http://www.caglayangrup.com.tr/images/kase.png' width='234' /></p> </div> <br /> <div> </div> </div>"; ePosta.Body = HtmlBody; SmtpClient smtp = new SmtpClient(); smtp.Credentials = new NetworkCredential("info@caglayangrup.com.tr", "x123456"); smtp.Port = 587; smtp.Host = "smtp.yandex.com.tr"; smtp.EnableSsl = true; smtp.Send(ePosta); }
Asp.NET Html Formatı Mail Gönderme
Kaydol:
Kayıtlar (Atom)
Hiç yorum yok:
Yorum Gönder