• 06-02-2015, 21:13:41
    #1
    Merhaba;

    sitemize üye olanlara otomatık sıstem kod olusturuyor ve 10 tl ındırım kupon kodu maıl gıdıyor suan text olarak gıdıyor.. bunu html cevırmek ıstıyorum nasıl yapabılırım acaba?

    ılgılı suan calısan kod

    //Coupon Code
    $couponcode = substr(number_format(time() * rand(),0,'',''),0,10);
    $this->db->query("INSERT INTO " . DB_PREFIX . "coupon SET name = 'Discount For " . $this->request->post['email'] . "', code = '" . $couponcode . "', discount = '10.0000', type = 'F', total = '100.0000', logged = '1', shipping = '0', date_start = NOW(), date_end = CURDATE() + INTERVAL 14 DAY, uses_total = '1', uses_customer = '1', status = '1', date_added = NOW()");
    $message = sprintf('Tebrikler! Sitemize üye olduğunuz için  100 TL ve üzeri  Alışverişlerinizde kullanabileceğiniz 10 TL Değerinde indirim kuponu kazandınız! Yanlızca erbilayakkabi.com sitemizde indirim için kullanacağınız kupon kodunuz : '.$couponcode, $this->config->get('config_name')) . "\n\n";
    $subject = sprintf('Üye olduğunuz için teşekkür ederiz. 10 TL indirim kuponu kazandınız! ', $this->config->get('config_name'));
    $mail = new Mail();
    $mail->protocol = $this->config->get('config_mail_protocol');
    $mail->parameter = $this->config->get('config_mail_parameter');
    $mail->hostname = $this->config->get('config_smtp_host');
    $mail->username = $this->config->get('config_smtp_username');
    $mail->password = $this->config->get('config_smtp_password');
    $mail->port = $this->config->get('config_smtp_port');
    $mail->timeout = $this->config->get('config_smtp_timeout');    
    $mail->setTo($this->request->post['email']);
    $mail->setFrom($this->config->get('config_email'));
    $mail->setSender($this->config->get('config_name'));
    $mail->setSubject(html_entity_decode($subject, ENT_QUOTES, 'UTF-8'));
    $mail->setText(html_entity_decode($message, ENT_QUOTES, 'UTF-8'));
    $mail->send();

    oraya eklemem gereken kodlar ; kaynaktan bakabılırsınız html uydun td olarak yapıldı

    http://www.erbilayakkabi.com/mailing/mail6/
  • 06-02-2015, 21:44:56
    #2
    Hocam zaten siz mail gönderirken onu html formatında yolluyorsunuz. Kod ile html kodunu yapılandırarak içerik olarak direk gönderebilirsiniz.
  • 06-02-2015, 21:58:15
    #3
    aliarbak adlı üyeden alıntı: mesajı görüntüle
    Hocam zaten siz mail gönderirken onu html formatında yolluyorsunuz. Kod ile html kodunu yapılandırarak içerik olarak direk gönderebilirsiniz.
    İlginiz için teşekkür ederim.. fakat ekledıgım zaman bos sayfa cıkıyor..

    ornek olarak alta ekler mısınız nasıl eklemem gerektıgını ?
  • 06-02-2015, 22:02:38
    #4
    DusLerforum adlı üyeden alıntı: mesajı görüntüle
    İlginiz için teşekkür ederim.. fakat ekledıgım zaman bos sayfa cıkıyor..

    ornek olarak alta ekler mısınız nasıl eklemem gerektıgını ?
    Hocam yıllardır php kullanmıyorum siz boş sayfa ile karşılaştığınız kodları buraya yazarsanız hatanızda yardımcı olmaya çalışırım.
  • 09-02-2015, 10:45:28
    #5
    sayfada sıkıntı yok

    alttakı kodlarda tebrıkler yazan yere ıcerık olarak lınktekı ıcerıgın kaynagını ekledıgımız zaman hem maıl gelmıyor hemde sayfa bos sayfa gelıyor

    //Coupon Code
    $couponcode = substr(number_format(time() * rand(),0,'',''),0,10);
    $this->db->query("INSERT INTO " . DB_PREFIX . "coupon SET name = 'Discount For " . $this->request->post['email'] . "', code = '" . $couponcode . "', discount = '10.0000', type = 'F', total = '100.0000', logged = '1', shipping = '0', date_start = NOW(), date_end = CURDATE() + INTERVAL 14 DAY, uses_total = '1', uses_customer = '1', status = '1', date_added = NOW()");
    $message = sprintf('Tebrikler! Sitemize üye olduğunuz için  100 TL ve üzeri  Alışverişlerinizde kullanabileceğiniz 10 TL Değerinde indirim kuponu kazandınız! Yanlızca erbilayakkabi.com sitemizde indirim için kullanacağınız kupon kodunuz : '.$couponcode, $this->config->get('config_name')) . "\n\n";
    $subject = sprintf('Üye olduğunuz için teşekkür ederiz. 10 TL indirim kuponu kazandınız! ', $this->config->get('config_name'));
    $mail = new Mail();
    $mail->protocol = $this->config->get('config_mail_protocol');
    $mail->parameter = $this->config->get('config_mail_parameter');
    $mail->hostname = $this->config->get('config_smtp_host');
    $mail->username = $this->config->get('config_smtp_username');
    $mail->password = $this->config->get('config_smtp_password');
    $mail->port = $this->config->get('config_smtp_port');
    $mail->timeout = $this->config->get('config_smtp_timeout');    
    $mail->setTo($this->request->post['email']);
    $mail->setFrom($this->config->get('config_email'));
    $mail->setSender($this->config->get('config_name'));
    $mail->setSubject(html_entity_decode($subject, ENT_QUOTES, 'UTF-8'));
    $mail->setText(html_entity_decode($message, ENT_QUOTES, 'UTF-8'));
    $mail->send();  
    orjınal kodlar

    ıcıne html maıl gelecek kodlar


    <table id="Tablo_01" width="680" height="584" border="0" cellpadding="0" cellspacing="0"> 	<tr> 			<td align="center" bgcolor="#71ba75" colspan="4" height="41" style="line-height:8px" width="680"><span style="font-family:trebuchet ms,helvetica,sans-serif;"><span style="color: rgb(255, 255, 255);"><strong><span style="font-size: 20px;">Merhabalar, Erbil Ayakkabıya Hoşgeldiniz!!!</span></strong></span></span></td> 	</tr> 	<tr> 		<td style="line-height:8px" colspan="3"> 			<img src="images/yenikayit_02.png" width="680" height="305" alt="" style="display: block;"></td> 	</tr> 	<tr> 		<td style="line-height:8px" rowspan="3"> 			<img src="images/yenikayit_03.png" width="201" height="57" alt="" style="display: block;"></td> 		<td style="line-height:8px" colspan="2"> 			<img src="images/yenikayit_04.png" width="479" height="1" alt="" style="display: block;"></td> 	</tr> 	<tr> 		<td style="line-height:8px" width="284" height="38" align="left">.$couponcode, $this->config->get('config_name')) . </td> 		<td style="line-height:8px"> 			<img src="images/yenikayit_06.png" width="195" height="38" alt="" style="display: block;"></td> 	</tr> 	<tr> 		<td style="line-height:8px" colspan="2"> 			<img src="images/yenikayit_07.png" width="479" height="18" alt="" style="display: block;"></td> 	</tr> 	<tr> 		<td style="line-height:8px" colspan="3"> 			<img src="images/yenikayit_08.png" alt="" style="display: block;" width="680" height="181" usemap="#Map" border="0"></td> 	</tr> </table> <!-- End Save for Web Slices -->  <map name="Map">   <area shape="rect" coords="264,17,417,51" href="http://www.erbilayakkabi.com/" target="_blank">   <area shape="rect" coords="504,58,555,76" href="http://www.erbilayakkabi.com/uye-olan-herkese-hediye" target="_blank">   <area shape="rect" coords="478,139,675,178" href="http://www.erbilayakkabi.com/" target="_blank">   <area shape="rect" coords="17,148,39,179" href="https://www.facebook.com/erbilayakkabi" target="_blank" alt="" style="display: block;">   <area shape="rect" coords="45,148,72,177" href="https://twitter.com/erbilayakkabi" target="_blank" alt="" style="display: block;">   <area shape="rect" coords="78,153,107,180" href="http://instagram.com/erbilayakkabi" target="_blank" alt="" style="display: block;"> </map>
  • 09-02-2015, 18:04:42
    #6
    Üyeliği durduruldu
    DusLerforum adlı üyeden alıntı: mesajı görüntüle
    sayfada sıkıntı yok

    alttakı kodlarda tebrıkler yazan yere ıcerık olarak lınktekı ıcerıgın kaynagını ekledıgımız zaman hem maıl gelmıyor hemde sayfa bos sayfa gelıyor

    //Coupon Code
    $couponcode = substr(number_format(time() * rand(),0,'',''),0,10);
    $this->db->query("INSERT INTO " . DB_PREFIX . "coupon SET name = 'Discount For " . $this->request->post['email'] . "', code = '" . $couponcode . "', discount = '10.0000', type = 'F', total = '100.0000', logged = '1', shipping = '0', date_start = NOW(), date_end = CURDATE() + INTERVAL 14 DAY, uses_total = '1', uses_customer = '1', status = '1', date_added = NOW()");
    $message = sprintf('Tebrikler! Sitemize üye olduğunuz için  100 TL ve üzeri  Alışverişlerinizde kullanabileceğiniz 10 TL Değerinde indirim kuponu kazandınız! Yanlızca erbilayakkabi.com sitemizde indirim için kullanacağınız kupon kodunuz : '.$couponcode, $this->config->get('config_name')) . "\n\n";
    $subject = sprintf('Üye olduğunuz için teşekkür ederiz. 10 TL indirim kuponu kazandınız! ', $this->config->get('config_name'));
    $mail = new Mail();
    $mail->protocol = $this->config->get('config_mail_protocol');
    $mail->parameter = $this->config->get('config_mail_parameter');
    $mail->hostname = $this->config->get('config_smtp_host');
    $mail->username = $this->config->get('config_smtp_username');
    $mail->password = $this->config->get('config_smtp_password');
    $mail->port = $this->config->get('config_smtp_port');
    $mail->timeout = $this->config->get('config_smtp_timeout');    
    $mail->setTo($this->request->post['email']);
    $mail->setFrom($this->config->get('config_email'));
    $mail->setSender($this->config->get('config_name'));
    $mail->setSubject(html_entity_decode($subject, ENT_QUOTES, 'UTF-8'));
    $mail->setText(html_entity_decode($message, ENT_QUOTES, 'UTF-8'));
    $mail->send();  
    orjınal kodlar

    ıcıne html maıl gelecek kodlar


    <table id="Tablo_01" width="680" height="584" border="0" cellpadding="0" cellspacing="0"> 	<tr> 			<td align="center" bgcolor="#71ba75" colspan="4" height="41" style="line-height:8px" width="680"><span style="font-family:trebuchet ms,helvetica,sans-serif;"><span style="color: rgb(255, 255, 255);"><strong><span style="font-size: 20px;">Merhabalar, Erbil Ayakkabıya Hoşgeldiniz!!!</span></strong></span></span></td> 	</tr> 	<tr> 		<td style="line-height:8px" colspan="3"> 			<img src="images/yenikayit_02.png" width="680" height="305" alt="" style="display: block;"></td> 	</tr> 	<tr> 		<td style="line-height:8px" rowspan="3"> 			<img src="images/yenikayit_03.png" width="201" height="57" alt="" style="display: block;"></td> 		<td style="line-height:8px" colspan="2"> 			<img src="images/yenikayit_04.png" width="479" height="1" alt="" style="display: block;"></td> 	</tr> 	<tr> 		<td style="line-height:8px" width="284" height="38" align="left">.$couponcode, $this->config->get('config_name')) . </td> 		<td style="line-height:8px"> 			<img src="images/yenikayit_06.png" width="195" height="38" alt="" style="display: block;"></td> 	</tr> 	<tr> 		<td style="line-height:8px" colspan="2"> 			<img src="images/yenikayit_07.png" width="479" height="18" alt="" style="display: block;"></td> 	</tr> 	<tr> 		<td style="line-height:8px" colspan="3"> 			<img src="images/yenikayit_08.png" alt="" style="display: block;" width="680" height="181" usemap="#Map" border="0"></td> 	</tr> </table> <!-- End Save for Web Slices -->  <map name="Map">   <area shape="rect" coords="264,17,417,51" href="http://www.erbilayakkabi.com/" target="_blank">   <area shape="rect" coords="504,58,555,76" href="http://www.erbilayakkabi.com/uye-olan-herkese-hediye" target="_blank">   <area shape="rect" coords="478,139,675,178" href="http://www.erbilayakkabi.com/" target="_blank">   <area shape="rect" coords="17,148,39,179" href="https://www.facebook.com/erbilayakkabi" target="_blank" alt="" style="display: block;">   <area shape="rect" coords="45,148,72,177" href="https://twitter.com/erbilayakkabi" target="_blank" alt="" style="display: block;">   <area shape="rect" coords="78,153,107,180" href="http://instagram.com/erbilayakkabi" target="_blank" alt="" style="display: block;"> </map>
      $mail->IsHTML(true);
    $mail->Body     = "<!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
    <title>TASARI</title>
    </head>
    <body>
    Mail : ".$email."<br/><br/>
    Ad ve Soyad : ".$name."<br/><br/>
    Kurs Türü : ".$kurs."<br/><br/>
    Telefon : ".$phone."<br/><br/>
    Mesaj : ".$mesaj."<br/><br/>
    </body>
    </html>";