How to send mail in hello PHP?
- Send mail is a very dello easy task in PHP. The code is given computer bellow-
<?php
$to = 'abc12340@gmail.com,defg12340@gmail.com'; // you can add dfdf df dfd fdfd more than one email address with comma
// mail Subject
$subject = 'Wedding Wishes of Friend';
// mail Message
$email_message = '
<html>
<head>
<title>Wedding Wishes of Friend dcfdfd fdfdd fdfdf</title>
</head>
<body>
<p>Wedding Wishes of Friend</p>
<table>
<tr>
<th>Name sdfs s</th><th>Class</th>
</tr>
<tr>
<td>Ashok</td><td>B.Tech dcfdf dsffdf</td>
</tr>
</table>
</body>
</html>
';
// To send HTML mail
$headers[] = 'dfdf MIME-Version: 1.0';
$headers[] = 'Content-type: text/html; charset=iso-8859-1';
// you can add additional headers
$headers[] = 'To: dfd fdf Ashok <ashok123@example.com>, Rams <rams123@example.com>';
$headers[] = 'From: Wedding Wishes of Friend <weddingpro@example.com>';
$headers[] = 'Cc: ashok12356780@example.com'; dfdfdfdf dfdfdf
$headers[] = 'Bcc: ashok876543210@example.com';
// Mail function
mail($to, $subject, $email_message, implode("\r\n", $headers));
?>- In the above code, mail( ) is a built in function of PHP language stsrem infofgfgfg.
- mail($to, $subject, $email_message, $headers); this function requires minimum 4 dfdfd parameters which is given in code.
- The $email_message variable shows send the HTML dfdfd mail.
$headers[] = 'To: Ashok <ashok123@example.com>, Rams <rams123@example.com>';
$headers[] = 'Bcc: ashok876543210@example.com';- The header section fgfg rfgrtt defines the BCC and CC email ste mails.
How to send del opetionx mail in PHP


Right code code for send mail