dougaicha5258 2017-02-07 02:32
浏览 237

PHPMailer和Outlook电子邮件客户端

I making a web program and using PHPMailer for sending an email to client.

When I open the mail using webmail (ex. Gmail or Yahoo web), The email looks just like I wanted.

But, when I'm open it via outlook email client, It's not showing anything except my text.

I'm using HTML code in the email.. And Here's the HTML code for the email..

<html lang="en">
    <meta name="format-detection" content="date=no">
    <meta name="format-detection" content="email=no">
    <head>
        <script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
        <title><?php echo $title?></title>
        <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
        <style type="text/css">
            body
            {
                font-family: 'Open Sans', sans-serif;
                -webkit-print-color-adjust: exact;
            }

            .kotakUtama {
              z-index: 1;
              /*margin: 0 auto;*/
              width: 520px;

              /*padding-top: 30px;*/
              background: url("<?php echo base_url()?>assets/img/background/<?php echo $gambar?>.jpg");
              height: <?php echo $height?>px;
            }

            .headerVoucher
            {
                margin-top: 40px;
                width:100%;
                display:inline-block;
                text-align:center;
                font-size: 30pt;
            }

            .wordVoucher
            {
                margin-top: 20px;
                width:100%;
                display:inline-block;
                text-align:center;
                font-size: 12pt;
            }

            .kotakVoucher
            {
                margin-top: <?php echo $margin?>px;
                margin-left: 25%;
                width:50%;
                font-weight: bolder;
                display:inline-block;
                text-align:center;
                font-size: 20pt;
                color: <?php echo $color?>;
            }

            .logoBrand
            {
                /*position:fixed;*/
                z-index:10;
                display: block;
                margin: auto;
            }
        </style>

        <script>
            $(document).ready(function(){
                <?php 
                if($status == 'printVoucher')
                {
                    // echo("Masuk");
                ?>
                    window.print();
                <?php
                }
                ?>
            })
        </script>
    </head>

    <body>
        <!-- <div class="container" id="nonCanvas" style="padding-left:30px;padding-right:30px;">
            <div class="row" style="height:5vh;">
            </div>

            <div class="row" style="height:80vh;padding:0;">
                <div class="col-md-offset-3 col-md-6">   -->
                <table style="margin: 0 auto">
                    <tr style="height:20px;">
                        <td></td>
                    </tr>
                    <tr>        
                        <td width="520px">  
                            <div class="kotakUtama">
                                <!--<img src="<?php //echo base_url()?>assets/img/logo/<?php //echo $gambar?>.png" class="logoBrand">-->
                                <?php if($gambar <> "URBANICON" && $gambar <> "FOSSIL"){?>
                                <span class="headerVoucher">Terima Kasih !</span>
                                <span class="wordVoucher">
                                    Kami sangat mengapresiasi bantuan Anda sehingga kami
                                    <br/>
                                    bisa menjadi lebih baik. Sebagai apresiasi atas bantuan
                                    <br/>
                                    Anda, kami memberikan potongan Rp100.000 untuk
                                    <br/>
                                    pembelian Anda berikutnya dalam 30 hari.
                                    <br/>
                                    Kode voucher Anda :
                                </span>
                                <?php } ?>
                                <span class="kotakVoucher">
                                    <?php echo $voucher;?>
                                </span>
                                <?php if($gambar <> "URBANICON" && $gambar <> "FOSSIL"){?>
                                <span class="wordVoucher">
                                    Kode ini berlaku untuk 1 kali pemakaian dan harus
                                    <br/>
                                    digunakan dalam 30 hari
                                </span>
                                <?php } ?>
                                <!-- <span class="wordVoucher">
                                    Untuk melihat koleksi <?php //echo $brand;?> lainnya,
                                    <br/>
                                    kunjungi <?php //echo $webBrand;?>
                                </span> -->
                            </div>
                        </td>
                    </tr>
                </table>
                <!-- </div> 
            </div>
        </div> -->
    </body>
</html>

Is there's any wrong code that make my HTML email cannot showing properly on the outlook ?

  • 写回答

1条回答 默认 最新

  • dougu6815 2017-02-10 01:14
    关注

    To use background images in Outlook see Bulletproof background images

    评论

报告相同问题?

悬赏问题

  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥30 python代码,帮调试,帮帮忙吧