简体   繁体   中英

Send actual page by email with php and codeigniter

I want to send the actual page by email, i can send it the problem is that when i open the mail the html dont have the css is obviously but how i can make that look seems the browser?

First I set in a hiddein input the html of the page:

var codigo = $("body").html();
$("#codigohtml").val(codigo);

And then i take it by selector .val() and put this in the message of the email i put the type of the mail to html.. the problem is with the css.

Thanks for your time!

Rather than having a separate CSS stylesheet, just put your CSS directly in your head tag:

<head>
    <style>
        /* CSS goes here */
    </style>
</head>
<body>
    <!-- Rest of email -->
</body>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM