/
email.php
57 lines (37 loc) · 1.12 KB
/
email.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
/*
Activate SMTP mail on XAMPP
*/
//https://www.youtube.com/watch?v=TO7MfDcM-Ho
//mail("ravinathp@unionb.com","UBHD Alert","HELPDESK Email Alert","From: helpdesk@unionb.com") or die ("unable to send email");
// From: parameter is mandatory
$headers = 'From: helpdesk@unionb.com' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$message = '
<html>
<head>
<style type="text/css">
body{
font-size: x-small;
}
</style>
</head>
<body>
<p>Here are the birthdays upcoming in August!</p>
<h3>query result</h3>' . getBodyContent() . '</body>
</html>
';
mail("ravinathp@unionb.com", "UBHD Alert", $message, $headers) or die("unable to send email");
function getBodyContent() {
$r = '<table>
<tr style="font-size: x-small">
<td valign="top">305 xx</td>
<td valign="top">WRONG RATE</td>
<td valign="top">288</td>
<td valign="top">2014-12-23 10:53:14</td>
<td valign="top">Feedback</td>
</tr>
</table>';
return $r;
}
?>