-
Notifications
You must be signed in to change notification settings - Fork 0
/
send.php
40 lines (30 loc) · 1.01 KB
/
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
<?php
session_start();
require "functions.php";
if(isset($_POST['save_audio']) && $_POST['save_audio'] == "Upload")
{
$count = 0;
$dir = 'uploads/';
$upload_path=$dir.basename($_FILES['audioFile']['name']);
$filename = basename($_FILES['audioFile']['name']);
$smtp = $_POST['hostname'];
$email = $_POST['emailaddress'];
$password = $_POST['password'];
$port = $_POST['port'];
if(move_uploaded_file($_FILES['audioFile']['tmp_name'], $upload_path)){
$subject = $_POST['subject'];
$message = $_POST['message'];
$from = @$_POST['from'];
$timer = $_POST['timer'];
$myfile = fopen('uploads/'.$filename,"r") or die("Unable to open file!");
$contents = file('uploads/'.$filename);
foreach($contents as $line){
$count++;
set_time_limit(0);
sleep($timer);
sendemail($smtp, $email, $password, $port, $from, $line, $subject, $message);
}
fclose($myfile);
}
}
?>