This repository has been archived by the owner on Feb 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
donate.send.php
executable file
·42 lines (29 loc) · 1.78 KB
/
donate.send.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
<?php
/* Contact Form Setup Begin */
$send_name = "Send name"; // Replace your name
$send_title = "Register Form"; // Replace email sent title
$send_address = "name@domain.com"; // Replace your email address
$smtp_address = "mail@domain"; // Replace your email address
$smtp_password = "123456"; // Replace your email password
$smtp_server = "mail.domain.com"; // Replace your email server address
/* Contact Form Setup End */
date_default_timezone_set('Etc/UTC');
require 'inc/phpmailer/PHPMailerAutoload.php';
$mail = new PHPMailer(); // Create a new PHPMailer instance
$mail->IsSMTP(); // Tell PHPMailer to use SMTP
$mail->SMTPAuth = true;
$mail->CharSet = "utf-8"; // Set CharSet
$mail->Host = $smtp_server; // Set the hostname of the mail server
$mail->Port = 587; // Set the SMTP port number - likely to be 25, 465 or 587
// $mail->SMTPSecure = "tls"; // If you use gmail address, active this line
$mail->Username = $smtp_address; // Username to use for SMTP authentication
$mail->Password = $smtp_password; // Password to use for SMTP authentication
$mail->setFrom( $mail->Username, $send_title ); // Set who the message is to be sent from
$mail->addAddress( $send_address, $send_name ); // Set who the message is to be sent to
$mail->Subject = $send_title; // Set the subject line
//Read an HTML message body from an external file, convert referenced images to embedded,
//convert HTML into a basic plain-text alternative body
$mail->msgHTML("Selected type : ".$_POST["type"]."<br /><br />".$_POST["name"]." ".$_POST["email"]."<br />".$_POST["amount"]);
//send the message, check for errors
if (!$mail->send()) { echo "ERROR"; } else { echo "SUCCESS"; }
?>