-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmailer.php
129 lines (126 loc) · 5.59 KB
/
mailer.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<?php
if (!empty($_POST["name1"]) && !empty($_POST["email1"]) && !empty($_POST["message1"])) {
$to = "ivan.ramirez@iramirezs.com";
$from = $_POST['email1'];
$name = $_POST['name1'];
$subject = "Tienes un mensaje de " . $name;
$message = $_POST['message1'];
$html = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
$html .= '<html xmlns="http://www.w3.org/1999/xhtml">';
$html .= '<head>';
$html .= '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
$html .= '<title>Demystifying Email Design$html .= </title>';
$html .= '<meta name="viewport" content="width=device-width, initial-scale=1.0"/>';
$html .= '</head>';
$html .= '<body style="margin: 0; padding: 0;">';
$html .= '<table border="0" cellpadding="0" cellspacing="0" width="100%">';
$html .= '<tr>';
$html .= '<td style="padding: 20px 0 30px 0;">';
$html .= '<table align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="border: 1px solid #ddd;">';
$html .= '<tr>';
$html .= '<td align="center" bgcolor="#70bbd9">';
$html .= '<img src="images/background-email.jpg" alt="Creating Email Magic" width="100%" style="display: block;" />';
$html .= '</td>';
$html .= '</tr>';
$html .= '<tr>';
$html .= '<td bgcolor="#ffffff" style="padding: 40px 30px 40px 30px;">';
$html .= '<table border="0" cellpadding="0" cellspacing="0" width="100%">';
$html .= '<tr>';
$html .= '<td style="color: #153643; font-family: Arial, sans-serif; font-size: 24px; ">';
$html .= 'HOLA IVÁN,';
$html .= '</td>';
$html .= '</tr>';
$html .= '<tr>';
$html .= '<td style="padding: 20px 0 30px 0; color: #153643; font-family: Arial, sans-serif; font-size: 16px; line-height: 20px;">';
$html .= $name . ' te manda el siguiente mensaje.';
$html .= '<br/>';
$html .= $message;
$html .= '<br/>';
$html .= '<br/>';
$html .= 'Puedes contactarlo/a al siguiente correo electrónico, ' . $from;
$html .= '</td>';
$html .= '</tr>';
// $html .= '<tr>';
// $html .= '<td>';
// $html .= '<table border="0" cellpadding="0" cellspacing="0" width="100%">';
// $html .= '<tr>';
// $html .= '<td width="260" valign="top">';
// $html .= '<table border="0" cellpadding="0" cellspacing="0" width="100%">';
// $html .= '<tr>';
// $html .= '<td>';
// $html .= '<img src="images/left.gif" alt="" width="100%" height="140" style="display: block;" />';
// $html .= '</td>';
// $html .= '</tr>';
// $html .= '<tr>';
// $html .= '<td style="padding: 25px 0 0 0; color: #153643; font-family: Arial, sans-serif; font-size: 16px; line-height: 20px;">';
// $html .= 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In tempus adipiscing felis, sit amet blandit ipsum volutpat sed. Morbi porttitor, eget accumsan dictum, nisi libero ultricies ipsum, in posuere mauris neque at erat.';
// $html .= '</td>';
// $html .= '</tr>';
// $html .= '</table>';
// $html .= '</td>';
// $html .= '<td style="font-size: 0; line-height: 0;" width="20">';
// $html .= ' ';
// $html .= '</td>';
// $html .= '<td width="260" valign="top">';
// $html .= '<table border="0" cellpadding="0" cellspacing="0" width="100%">';
// $html .= '<tr>';
// $html .= '<td>';
// $html .= '<img src="images/right.gif" alt="" width="100%" height="140" style="display: block;" />';
// $html .= '</td>';
// $html .= '</tr>';
// $html .= '<tr>';
// $html .= '<td style="padding: 25px 0 0 0; color: #153643; font-family: Arial, sans-serif; font-size: 16px; line-height: 20px;">';
// $html .= 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In tempus adipiscing felis, sit amet blandit ipsum volutpat sed. Morbi porttitor, eget accumsan dictum, nisi libero ultricies ipsum, in posuere mauris neque at erat.';
// $html .= '</td>';
// $html .= '</tr>';
// $html .= '</table>';
// $html .= '</td>';
// $html .= '</tr>';
// $html .= '</table>';
// $html .= '</td>';
// $html .= '</tr>';
$html .= '</table>';
$html .= '</td>';
$html .= '</tr>';
$html .= '<tr>';
$html .= '<td bgcolor="#424242" style="padding: 30px 30px 30px 30px;">';
$html .= '<table border="0" cellpadding="0" cellspacing="0" width="100%">';
$html .= '<tr>';
$html .= '<td style="color: #ffffff; font-family: Arial, sans-serif; font-size: 14px;">';
$html .= '<a href="http://www.iramirezs.com/" style="color: #ffffff;"><font color="#ffffff">Mi página web</font></a>';
$html .= '</td>';
$html .= '<td align="right">';
$html .= '<table border="0" cellpadding="0" cellspacing="0">';
$html .= '<tr>';
$html .= '<td>';
$html .= '<a href="https://github.com/ifram333">';
$html .= '<img src="images/github-email-logo.png" alt="GitHub" width="38" height="38" style="display: block;" border="0" />';
$html .= '</a>';
$html .= '</td>';
$html .= '<td style="font-size: 0; line-height: 0;" width="20">';
$html .= ' ';
$html .= '</td>';
$html .= '<td>';
$html .= '<a href="https://www.linkedin.com/in/ifram333/">';
$html .= '<img src="images/linkedin-email-logo.png" alt="LinkedIn" width="38" height="38" style="display: block;" border="0" />';
$html .= '</a>';
$html .= '</td>';
$html .= '</tr>';
$html .= '</table>';
$html .= '</td>';
$html .= '</tr>';
$html .= '</table>';
$html .= '</td>';
$html .= '</tr>';
$html .= '</table>';
$html .= '</td>';
$html .= '</tr>';
$html .= '</table>';
$html .= '</body>';
$html .= '</html>';
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html; charset=UTF-8" . "\r\n";
$headers .= 'From: <info@iramirezs.com>' . "\r\n";
mail($to,$subject,$html,$headers);
}
?>