Home > Blockchain >  Sending only textual content with mail function in php
Sending only textual content with mail function in php

Time:11-01

I have read that i must include some headers when using mail() function in PHP like:

$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";

but in my case i want only to send text, not html. so are those headers will still be required to make a successful mail?

CodePudding user response:

Headers of mail() function are optional. Your email can be delivered successfully, without any header.

Note that some default values will be set. As an example, if you do not declare a sender (From), the server name will be used instead.

  •  Tags:  
  • php
  • Related