email-script-class
Code (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
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
<?PHP
class Mail
{
var $ownMail;
var $name;
function mail()
{
$this->ownMail = "Je email adres"
$this->name = "Je eigen naam";
$this->senderProgram = "Microsoft Outlook";
}
function sendMail($to, $subject, $message)
{
$headers .= "From: ".$this->name." <".$this->ownMail.">\\n";
$headers .= "X-Sender: <".$this->ownMail.">\\n";
$headers .= "X-Mailer: <".$this->senderProgram.">\\n";
$headers .= "X-Priority: 1\\n";
$headers .= "Reply-To: <".$this->ownMail.">\\n";
$headers .= "Return-Path: <".$this->ownMail.">\\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1\\n";
$message = nl2br($message);
mail($to, $subject, $message, $headers);
}
}
?>
class Mail
{
var $ownMail;
var $name;
function mail()
{
$this->ownMail = "Je email adres"
$this->name = "Je eigen naam";
$this->senderProgram = "Microsoft Outlook";
}
function sendMail($to, $subject, $message)
{
$headers .= "From: ".$this->name." <".$this->ownMail.">\\n";
$headers .= "X-Sender: <".$this->ownMail.">\\n";
$headers .= "X-Mailer: <".$this->senderProgram.">\\n";
$headers .= "X-Priority: 1\\n";
$headers .= "Reply-To: <".$this->ownMail.">\\n";
$headers .= "Return-Path: <".$this->ownMail.">\\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1\\n";
$message = nl2br($message);
mail($to, $subject, $message, $headers);
}
}
?>