Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // To send HTML mail, the Content-type header must be set
- $headers = [];
- $headers[] = 'MIME-Version: 1.0';
- $headers[] = 'Content-type: text/html; charset=iso-8859-1';
- $headers[] = 'From: Do Not Reply <noreply@example.com>';
- $content = '
- <html>
- <head>
- <style>
- p {
- color: red;
- font-size: 18px;
- }
- </style>
- </head>
- <body>
- <p>This is test message.</p>
- </body>
- </html>
- ';
- echo mail( 'johndoe@gmail.com', 'From Human', $content, implode("\r\n", $headers) ) . PHP_EOL;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement