Send HTML Design on Email using PHP

15

Using PHP mail() function we can easily send the text email. But most of the cases we need to send nice HTML email to the users. Like registration welcome email, contact request submission email, invoice email etc. You can easily send the HTML email using PHP mail()function with our PHP HTML email script.

We have created a welcome email HTML template and sent to the email. From the Demo link you can receive the HTML email template into inbox.

PHP Code:

Content-type header is mandatory for sending HTMl email. The additional headers are used for adding From, Cc, Bcc etc. $htmlContentvariable hold the HTML contents of the email.

If you want to add huge HTML contents you can put the HTML contents into a file (email_template.html) and get the file contents using file_get_contents() function.

 

Leave A Reply

Your email address will not be published.