Sunday, February 28, 2016

Send PHP Email in HTML Format

PHP Email is one of the useful functions you can use to send email to one and more people. and you can also use this to send many emails, to people such as who submit a form or who contact you via blog or website.

So let,s see how to submit PHP EMAIL, Plain-Text Email in PHP
First you should know about the basic email functionality in PHP, 
you simply need some steps to be added in the email function something like below


$to = “receiver@gmail.com”;$subject = “Verify Your Email”;$message = “This is a message for you!”;$from = “sender@yahoo.com”;mail($to,$subject,$message,$from);

Above local variables hold some information and then we use the PHP, Email function easily. So, if you want to send a beautiful HTML & CSS formatted (Email) then you do so. Carry on reading.

Sending PHP Email with HTML & CSS Easily
You can use extra headers to send an email which contains HTML and CSS codes, and this will be actually applied on the page. 
Now below is the some code which you can take from here and can use in your site-projects, this will send the email to the user which is in the $to variable, and the email will be fully designed.


///////////------My Blogger Tools--------////////////$to = “someone@something.com;$subject = “Verify your email address.”;$message = ”<html>Hello <strong>John Doe</strong><h2>We are a company here in the USA</h2><marquee>We do business with clients</marquee><h3 style=’color:read;’>We welcome you to our website</h3></html>“;// Always set content-type when sending HTML email$headers = “MIME-Version: 1.0” . “\r\n”;$headers .= “Content-type:text/html;charset=UTF-8” . “\r\n”;$headers .= ‘From: <mbt@mybloggertools.com>‘ . “\r\n”;mail($to,$subject,$message,$headers);///////////------My Blogger Tools--------////////////

Above email is the perfect one with HTML and CSS (Web or blog) tags, you can change it according to your own information. 
But the important part in above email "syntax" is the ($headers variable) in which we’ve defined the version and content with character & set. So  this format will be treated as HTML email by the browser and email provider. 
You also can change the (from:<mbt@mybloggertools.com>) to your own email from which you want to send an email to someone.

If you have any questions about this tutorial or any other tutorial on this website then don’t hesitate to ask your question using below commenting area below this posts Thanks!

Previous Post
Next Post

44 comments:

  1. Such as very valuable information and it's very helpful in my carrier, I really appreciate the kind words.you are the master of content.
    sap basis training in chennai

    ReplyDelete
    Replies
    1. I have read your blog its very attractive and impressive. I like it your blog.

      PHP Training in chennai | PHP Training Course

      PHP Training in chennai | Online PHP Course

      Delete
    2. I have read your blog its very attractive and impressive. I like it your blog.

      Email Marketing India Email Marketing Services India

      Delete
  2. its really very helpful to send the mail in PHP with HTML format. and its really good to know how to send with authorized commands.thanks for sharing. keep update.
    SEO Training in Chennai

    ReplyDelete
  3. your content is really great's sound ,it is implementing me to work more in this kind of information and it is a incredible work.


    digital marketing training in chennai

    ReplyDelete
  4. Thanks for your informative post!!! After completing my graduation, i am confused whether to choose web design as my career. Your article helped me to make a right choice. PHP Training in Chennai

    ReplyDelete
  5. Hire PHP programmer who customizes your website to the finest accuracy. PHP outsource can be done from a
    PHP development company which provides presence and sufficient impetus towards the growth of your business.
    Please visit us: php

    ReplyDelete


  6. Thanks for the good words! Really appreciated. Great post. I ve been commenting a lot on a few blogs recently, but I had nt thought about my approach until you brought it up.

    SAP training in Chennai

    ReplyDelete
  7. This could have been prevented if the user had been a bit more alert and monitored their gmail account activity regularly.create gmail account

    ReplyDelete
  8. Thank you for taking the time to provide us with your valuable information. We strive to provide our candidates with excellent care and we take your comments to heart.As always, we appreciate your confidence and trust in us.
    seo company in chennai

    ReplyDelete
  9. Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.

    monkey go happy| yahtzee with buddies| | mahjong | | defendyournuts 2| superfighters 2 |

    ReplyDelete
  10. Thanks for giving the unique content, you have done a great job I appreciate your effort and I hope you will get more positive comments from the web users

    Dot Net training in chennai

    ReplyDelete
  11. nice blog too informative. looking and reading your points its so impressive. doing more blog like this. i really appreciated doing like this.
    Digital Marketing Course in Chennai

    ReplyDelete
  12. Very very informative stuff. keep it up.

    Mike Craig
    Internet marketer

    ReplyDelete
  13. Good post. I learned some new things. Thanks for sharing.

    php training in chennai

    ReplyDelete
  14. The blog was absolutely fantastic! Lot of great information which was helpful
    Best software testing training institute in velachery

    ReplyDelete
  15. By reading your blog post i gained more information.
    Social Media Marketing

    ReplyDelete
  16. If you are confronting with your Yahoo account. So, just dial a Yahoo technical support number and forget all issues with your Yahoo account.Customer Support Number of Yahoo

    ReplyDelete
  17. Thank you for this valuable information. I have got some important suggestions from it. I'm working in Brave Technologies Private Limited. We provides lowest price of ERP Software for our clients. Contact us on info@bravetechnologies.in
    Manufacturing ERP software Chennai | Automotive ERP in Chennai

    ReplyDelete
  18. Very Nice Blog I like the way you explained these things. I’ve been looking for ways to improve my website and overall rankings.I hope your future article will help me further.Take SEO Training in Chennai to mould yourself.

    ReplyDelete
  19. Wonderful article, very useful and well explanation. Thanks a lot for offering this unique post with us. I really enjoyed by reading your blog post
    Digital marketing course in chennai

    ReplyDelete
  20. Thanks for such a great information and to provide us. We have the finest I mcafee certified technicians and If you're facing trouble in your mcafee antivirus software then just go through the link here. Click Here:- http://mcafeetechsupport.com/

    ReplyDelete
  21. We share this topics information was really good.I really beneficial our blog associated info.We share this topic related to HTML with PHP Any IT industry framework developed using to PHP and HTML framework coding. Appreciate to many I'll liked this.SEO Training in Chennai

    ReplyDelete
  22. http://www.celebratejobs.com/
    http://celebratejobs.com/ are the leading manpower consultancy located in Delhi/NCR can help you with the best jobs as per locations and requirements

    ReplyDelete
  23. 888-224-0568
    A very Impressive and detailed post. Thanks for sharing such a wonderful and important information.
    For more info how to fix yahoo problems visit us @ Visit here

    ReplyDelete
  24. Good and Nice article, it is very useful for me, thanks for sharing your views and ideas... keep rocks....
    Best Javva Training in chennai | Best PHP Training in chennai |Best Dot Net Training in chennai

    ReplyDelete
  25. Excellent Blog with useful concept., this blog contain very useful information and for the further information about the php kindly visit our site.. Best Dot Net Training in Chennai | Best Java Training in Chennai | Best Web Design Training in Chennai

    ReplyDelete
  26. its really very helpful to send the mail in PHP with HTML format. and its really good to know how to send with authorized commands.thanks for sharing. keep update.

    Dot Net Training Institute in Chennai

    ReplyDelete
  27. I agree with your blog, really your blog contain very useful information. Thanks for sharing such a nice blog. CCNA Training Institute in Chennai | CCNP Training Institute in Chennai | Six Sigma Training in Chennai

    ReplyDelete
  28. Hi Good day....

    Excellent post and very useful for web designers. PHP is the language used for web designing trending the market now.

    php training in coimbatore

    seo training in coimbatore

    web design training coimbatore

    ReplyDelete

  29. The website is looking bit flashy and it catches the visitors eyes. A design is pretty simple and a good user-friendly interface.

    Programmierung in L├╝denscheid

    ReplyDelete