Question Detail

Send mail through core php

1 years ago Views 163 Visit Post Reply

How can i send mail through basic mail() function of core php


Thread Reply

Hemant Sharma

- 1 years ago

you have not put any details here. what error you are getting or what wrong with you. Please Mention full detail about your Problem for our Better understanding.
for send Mail try This maybe Work for you : 

<?php
$to = "firstperson@demo.com, secondperson@demo.com";
$subject = "HTML email";

$message = "
<html>
<head>
<title>HTML email</title>
</head>
<body>
<p>This email contains HTML Tags!</p>
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
</tr>
</table>
</body>
</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";

// More headers
$headers .= 'From: <sender@demo.com>' . "\r\n";
$headers .= 'Cc: mainperson@demo.com' . "\r\n";

mail($to,$subject,$message,$headers);
?>

Hemant Sharma

- 1 years ago

you have not put any details here. what error you are getting or what wrong with you. Please Mention full detail about your Problem for our Better understanding.
for send Mail try This maybe Work for you : 

<?php
$to = "firstperson@demo.com, secondperson@demo.com";
$subject = "HTML email";

$message = "
<html>
<head>
<title>HTML email</title>
</head>
<body>
<p>This email contains HTML Tags!</p>
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
</tr>
</table>
</body>
</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";

// More headers
$headers .= 'From: <sender@demo.com>' . "\r\n";
$headers .= 'Cc: mainperson@demo.com' . "\r\n";

mail($to,$subject,$message,$headers);
?>

Anonymous

- 9 months ago

On average, most studies with AChEIs reported by the pharmaceutical industry showed a cognitive enhancement of 2??“3 points (vs placebo) in the ADAS-Cog score in clinical trials of 12??“30 weeks??™ duration, with improvement in 12%??“58% of patients, 5%??“73% of drop-outs, and side-effects in 2%??“58% of cases ( Giacobini 2006). What kind of tests might highlight the underlying causes of male impotence? Therefore, LIPEX is more effective when taken in the evening. Talk to your doctor or pharmacist if this does not help. Tallent MB, Simmons RL, Najarian JS. Alminoprofen may increase the neuroexcitatory activities of Norfloxacin.