Search
 
SCRIPT & CODE EXAMPLE
 

PHP

phpmail headers

<?php
// Multiple recipients
$to = 'johny@example.com, sally@example.com'; // note the comma

// Subject
$subject = 'Birthday Reminders for August';

// Message
$message = '
<html>
<head>
  <title>Birthday Reminders for August</title>
</head>
<body>
  <p>Here are the birthdays upcoming in August!</p>
  <table>
    <tr>
      <th>Person</th><th>Day</th><th>Month</th><th>Year</th>
    </tr>
    <tr>
      <td>Johny</td><td>10th</td><td>August</td><td>1970</td>
    </tr>
    <tr>
      <td>Sally</td><td>17th</td><td>August</td><td>1973</td>
    </tr>
  </table>
</body>
</html>
';

// To send HTML mail, the Content-type header must be set
$headers[] = 'MIME-Version: 1.0';
$headers[] = 'Content-type: text/html; charset=iso-8859-1';

// Additional headers
$headers[] = 'To: Mary <mary@example.com>, Kelly <kelly@example.com>';
$headers[] = 'From: Birthday Reminder <birthday@example.com>';
$headers[] = 'Cc: birthdayarchive@example.com';
$headers[] = 'Bcc: birthdaycheck@example.com';

// Mail it
mail($to, $subject, $message, implode("
", $headers));
?>
Comment

how to custom header in phpmailer

$mail->setFrom('from@example.com', 'Mailer');
Comment

PREVIOUS NEXT
Code Example
Php :: This domain is not registered with Tiny Cloud. Please see the quickstart guide or create an account. 
Php :: remove field from object php 
Php :: unset method 
Php :: php convert accented characters to html entities 
Php :: laravel use npm package 
Php :: generate a unique id 
Php :: Using $this when not in object context 
Php :: php iframe add content 
Php :: fixing unclosed html tags 
Php :: dependency injection php 
Php :: laravel verify email custom url 
Php :: PHP XML Expat Parser 
Php :: cases_sensitive 
Php :: how to get post by comment in laravel 
Php :: which is file attributes in php 
Php :: how to convert an array to uppercase before storing in database 
Php :: php interview questions for 2 year experience 
Php :: what is php 
Php :: php vs python speed 
Php :: php create array 
Php :: Warning: password_verify() expects parameter 2 to be string, array given in 
Php :: laravel seeder update 
Php :: create crud controller in laravel 5.8 
Php :: get firstwod php 
Php :: check box with value in php 
Php :: laravel 8 
Php :: deleting a database in phpmyadmin 
Php :: getDoctrine 
Php :: undefined index / error reporting in php 
Php :: PHP strnatcasecmp — Case insensitive string comparisons using a "natural order" algorithm 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =