3

I am trying to embed html tags in mail body. Its working fine, but bootstrap classes are not working, thus losing responsiveness in the mail body.

<head>
    <link href="css/bootstrap.min.css" rel="stylesheet">
</head>

I am using PHP mailer for mailing. Already added bootstrap source file. Any help pls..Following is the code for mail body.

$body="<div class='container'>
                <div class='row'>
                    <div class='col-xl-12'>
                        <p style='padding-top:30px;color: #1f497d;'><b>XXXXXX</b></p>
                        <p style='padding-bottom:15px;color: #1f497d;'>XXXX</p>
                        <img class='img-responsive' id='mail-logo' src='cid:logo_2u' width='500'>
                        <p style='color: #1f497d;'><img class='img-responsive' src='cid:location-icon'> Address here</p>
                        <p style='color: #1f497d;'><img class='img-responsive' src='cid:phone-icon'> +XXXXXX   <img class='img-responsive' src='cid:fax-icon'> +XXXXXX   <img class='img-responsive' src='cid:mobile-icon'> +XXXXXX</p>
                        <p style='color: #1f497d;'><img class='img-responsive' src='cid:email-icon'> XXXXXXX | XXXXX    <img class='img-responsive' src='cid:globe-icon'> XXXXXX</p>
                    </div>
                </div>
            </div>";
A Mak
  • 65
  • 4
  • 12

1 Answers1

1

Before ask a question please search about it:

When u create an email Template, you must use inline styles with the template.

Can I use bootstrap for designing HTML Email Templates

Email Template Design with Bootstrap

aidinMC
  • 1,415
  • 3
  • 18
  • 35