Initial Commit
This commit is contained in:
4
checktime.php
Normal file
4
checktime.php
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
echo $dateTimeToday = date("Y-m-d H:i:s");
|
||||||
44
daily_order_report.php
Normal file
44
daily_order_report.php
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
include 'dbconfig.php';
|
||||||
|
$dateToday = date('Y-m-d', strtotime('-1 day'));
|
||||||
|
|
||||||
|
$q = $conn->prepare("SELECT t.StoreName, o.ProductName, o.NAME, o.NUMBER, o.Size, o.JerseySize, o.ShortsSize, o.Price, o.Quantity, (o.Price * o.Quantity) AS TotalPrice, ((o.Price * o.Quantity) * 0.10) AS Tax,
|
||||||
|
o.DateCreated, pd.InvoiceNumber, pd.Payer_Email FROM orders AS o
|
||||||
|
INNER JOIN payment_details AS pd ON pd.CartKey = o.CartKey
|
||||||
|
INNER JOIN teamstores AS t ON t.Id = o.StoreId
|
||||||
|
WHERE o.DateCreated BETWEEN '2019-03-13 00:00:00' AND '2019-03-13 23:59:00'
|
||||||
|
ORDER BY o.DateCreated");
|
||||||
|
$q->execute();
|
||||||
|
$result = $q->rowCount();
|
||||||
|
|
||||||
|
if($result > 0){
|
||||||
|
$delimiter = ",";
|
||||||
|
$filename = "daily_order_report_" . $dateToday . ".csv";
|
||||||
|
|
||||||
|
//create a file pointer
|
||||||
|
$f = fopen('php://memory', 'w');
|
||||||
|
echo $f;
|
||||||
|
//set column headers
|
||||||
|
$fields = array('StoreName', 'ProductName', 'NAME', 'NUMBER', 'Size', 'JerseySize', 'ShortsSize', 'Price', 'Quantity', 'TotalPrice', 'Tax', 'DateCreated', 'InvoiceNumber', 'Payer_Email');
|
||||||
|
fputcsv($f, $fields, $delimiter);
|
||||||
|
|
||||||
|
while ($row = $q->fetch()) {
|
||||||
|
$lineData = array($row['StoreName'], $row['ProductName'], $row['NAME'], $row['NUMBER'], $row['Size'], $row['JerseySize'], $row['ShortsSize'], $row['Price'], $row['Quantity'], $row['TotalPrice'], $row['Tax'], $row['DateCreated'], $row['InvoiceNumber'], $row['Payer_Email']);
|
||||||
|
fputcsv($f, $lineData, $delimiter);
|
||||||
|
}
|
||||||
|
|
||||||
|
// move back to beginning of file
|
||||||
|
fseek($f, 0);
|
||||||
|
|
||||||
|
//set headers to download file rather than displayed
|
||||||
|
header('Content-Type: text/csv');
|
||||||
|
header('Content-Disposition: attachment; filename="' . $filename . '";');
|
||||||
|
|
||||||
|
//output all remaining data on a file pointer
|
||||||
|
fpassthru($f);
|
||||||
|
|
||||||
|
|
||||||
|
}else{
|
||||||
|
echo 'no orders for today';
|
||||||
|
}
|
||||||
22
daily_order_reports/daily_order_report_2019-07-18.csv
Normal file
22
daily_order_reports/daily_order_report_2019-07-18.csv
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
StoreName,ProductName,NAME,NUMBER,Size,JerseySize,ShortsSize,Price,Quantity,TotalPrice,Tax,DateCreated,InvoiceNumber,Payer_Email
|
||||||
|
"World Class Basketball",Socks,,,,,,12.00,2,24,2.4000000000000004,"2019-03-13 14:11:35",2019-5c8958991de3a,
|
||||||
|
"World Class Basketball","Illinois Sleeveless Hoodie",,,M,,,25.00,1,25,2.5,"2019-03-13 14:14:14",2019-5c8958991de3a,
|
||||||
|
"World Class Basketball","Wisconsin Long Sleeve",,,L,,,25.00,1,25,2.5,"2019-03-13 14:15:48",2019-5c8958991de3a,
|
||||||
|
"World Class Basketball","Illinois Away Uniform",,44,,YXL,YXL,40.00,1,40,4,"2019-03-13 14:18:57",2019-5c8958991de3a,
|
||||||
|
"World Class Basketball","Illinois Away Uniform",,3,,YXL,YXL,40.00,1,40,4,"2019-03-13 14:18:57",2019-5c8958991de3a,
|
||||||
|
"World Class Basketball","Illinois Away Uniform",,15,,M,M,40.00,1,40,4,"2019-03-13 14:18:57",2019-5c8958991de3a,
|
||||||
|
"World Class Basketball","Illinois Away Uniform",,11,,S,S,40.00,1,40,4,"2019-03-13 14:18:57",2019-5c8958991de3a,
|
||||||
|
"World Class Basketball","Illinois Away Uniform",,0,,YL,YL,40.00,1,40,4,"2019-03-13 14:18:57",2019-5c8958991de3a,
|
||||||
|
"World Class Basketball","Illinois Away Uniform",,2,,S,S,40.00,1,40,4,"2019-03-13 14:18:57",2019-5c8958991de3a,
|
||||||
|
"World Class Basketball","Illinois Away Uniform",,5,,YXL,YXL,40.00,1,40,4,"2019-03-13 14:18:57",2019-5c8958991de3a,
|
||||||
|
"World Class Basketball","Illinois Away Uniform",,20,,YL,YL,40.00,1,40,4,"2019-03-13 14:18:57",2019-5c8958991de3a,
|
||||||
|
"World Class Basketball","Illinois Away Uniform",,4,,YL,YL,40.00,1,40,4,"2019-03-13 14:18:57",2019-5c8958991de3a,
|
||||||
|
"World Class Basketball","Illinois Home Uniform",,15,,M,M,40.00,1,40,4,"2019-03-13 14:22:29",2019-5c8958991de3a,
|
||||||
|
"World Class Basketball","Illinois Home Uniform",,11,,S,S,40.00,1,40,4,"2019-03-13 14:22:29",2019-5c8958991de3a,
|
||||||
|
"World Class Basketball","Illinois Home Uniform",,0,,YL,YL,40.00,1,40,4,"2019-03-13 14:22:29",2019-5c8958991de3a,
|
||||||
|
"World Class Basketball","Illinois Home Uniform",,2,,S,S,40.00,1,40,4,"2019-03-13 14:22:29",2019-5c8958991de3a,
|
||||||
|
"World Class Basketball","Illinois Home Uniform",,5,,YXL,YXL,40.00,1,40,4,"2019-03-13 14:22:29",2019-5c8958991de3a,
|
||||||
|
"World Class Basketball","Illinois Home Uniform",,20,,YL,YL,40.00,1,40,4,"2019-03-13 14:22:29",2019-5c8958991de3a,
|
||||||
|
"World Class Basketball","Illinois Home Uniform",,4,,YL,YL,40.00,1,40,4,"2019-03-13 14:22:29",2019-5c8958991de3a,
|
||||||
|
"World Class Basketball","Illinois Home Uniform",,44,,YXL,YXL,40.00,1,40,4,"2019-03-13 14:22:29",2019-5c8958991de3a,
|
||||||
|
"World Class Basketball","Illinois Home Uniform",,3,,YXL,YXL,40.00,1,40,4,"2019-03-13 14:22:29",2019-5c8958991de3a,
|
||||||
|
180
daily_order_reports/daily_order_report_2019-08-31.csv
Normal file
180
daily_order_reports/daily_order_report_2019-08-31.csv
Normal file
@@ -0,0 +1,180 @@
|
|||||||
|
StoreName,ProductName,NAME,NUMBER,Size,JerseySize,ShortsSize,Price,Quantity,TotalPrice,Tax,DateCreated,InvoiceNumber,Payer_Email
|
||||||
|
Limitless,"Black Uniform",,12,,S,S,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,11,,YXL,S,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,6,,S,YL,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,30,,YXL,YXL,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,30,,S,M,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,15,,YXL,S,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,25,,S,M,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,1,,YXS,YS,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,8,,M,YXL,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,18,,YM,YL,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,0,,M,YL,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,6,,YL,M,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,23,,M,XL,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,17,,YL,S,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,1,,L,YXL,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,7,,YL,M,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,13,,YL,YM,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,0,,S,YL,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,4,,S,M,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,21,,YXL,YL,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,0,,YXL,M,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,34,,S,YL,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,10,,YXL,M,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,67,,S,M,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,3,,YXL,M,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,11,,M,M,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,29,,YXS,YM,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,7,,M,L,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,23,,YM,YS,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,7,,M,S,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,53,,YL,YXL,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,10,,M,YL,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,21,,YL,L,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,24,,L,S,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,2,,YL,L,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,27,,XL,S,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,23,,S,S,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,21,,S,M,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,23,,YXL,YXL,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,33,,YXL,YL,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,8,,S,M,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,11,,YXL,YL,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,54,,S,YL,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,7,,YXL,S,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,9,,M,YM,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,5,,YM,S,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,34,,M,M,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,10,,YM,S,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,2,,M,YL,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,17,,YL,YL,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,0,,L,YS,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,0,,YL,M,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,19,,YL,YM,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Black Uniform",,34,,XL,S,45.00,1,45,4.5,"2019-08-31 22:22:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,22,L,,,25.00,1,25,2.5,"2019-08-31 22:27:51",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,40,L,,,25.00,1,25,2.5,"2019-08-31 22:27:51",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,34,L,,,25.00,1,25,2.5,"2019-08-31 22:28:24",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,5,L,,,25.00,1,25,2.5,"2019-08-31 22:28:24",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,1,L,,,25.00,1,25,2.5,"2019-08-31 22:29:26",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,24,L,,,25.00,1,25,2.5,"2019-08-31 22:29:26",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,5,M,,,25.00,1,25,2.5,"2019-08-31 22:33:16",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,0,L,,,25.00,1,25,2.5,"2019-08-31 22:33:16",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,42,M,,,25.00,1,25,2.5,"2019-08-31 22:35:11",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,35,M,,,25.00,1,25,2.5,"2019-08-31 22:35:11",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,21,M,,,25.00,1,25,2.5,"2019-08-31 22:35:44",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,21,M,,,25.00,1,25,2.5,"2019-08-31 22:35:44",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,12,M,,,25.00,1,25,2.5,"2019-08-31 22:36:13",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,9,M,,,25.00,1,25,2.5,"2019-08-31 22:36:13",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,4,M,,,25.00,1,25,2.5,"2019-08-31 22:36:29",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,4,M,,,25.00,1,25,2.5,"2019-08-31 22:36:29",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,10,M,,,25.00,1,25,2.5,"2019-08-31 22:40:17",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,42,M,,,25.00,1,25,2.5,"2019-08-31 22:40:17",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,2,M,,,25.00,1,25,2.5,"2019-08-31 22:40:56",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,23,M,,,25.00,1,25,2.5,"2019-08-31 22:40:56",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,7,M,,,25.00,1,25,2.5,"2019-08-31 22:42:48",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,0,M,,,25.00,1,25,2.5,"2019-08-31 22:42:48",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,7,M,,,25.00,1,25,2.5,"2019-08-31 22:44:29",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,34,M,,,25.00,1,25,2.5,"2019-08-31 22:44:29",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,9,M,,,25.00,1,25,2.5,"2019-08-31 22:45:11",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,8,M,,,25.00,1,25,2.5,"2019-08-31 22:45:11",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,11,M,,,25.00,1,25,2.5,"2019-08-31 22:45:59",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,35,S,,,25.00,1,25,2.5,"2019-08-31 22:45:59",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,33,S,,,25.00,1,25,2.5,"2019-08-31 22:47:01",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,3,S,,,25.00,1,25,2.5,"2019-08-31 22:47:01",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,23,S,,,25.00,1,25,2.5,"2019-08-31 22:47:29",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,8,S,,,25.00,1,25,2.5,"2019-08-31 22:47:29",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,15,S,,,25.00,1,25,2.5,"2019-08-31 22:48:30",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,23,S,,,25.00,1,25,2.5,"2019-08-31 22:48:30",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,20,S,,,25.00,1,25,2.5,"2019-08-31 22:49:02",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,1,S,,,25.00,1,25,2.5,"2019-08-31 22:49:02",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,12,S,,,25.00,1,25,2.5,"2019-08-31 22:49:42",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,31,S,,,25.00,1,25,2.5,"2019-08-31 22:49:42",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,11,S,,,25.00,1,25,2.5,"2019-08-31 22:50:16",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,9,S,,,25.00,1,25,2.5,"2019-08-31 22:50:16",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,5,S,,,25.00,1,25,2.5,"2019-08-31 22:51:24",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,1,S,,,25.00,1,25,2.5,"2019-08-31 22:51:24",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,35,S,,,25.00,1,25,2.5,"2019-08-31 22:51:59",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,1,S,,,25.00,1,25,2.5,"2019-08-31 22:51:59",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,14,S,,,25.00,1,25,2.5,"2019-08-31 22:52:28",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,0,S,,,25.00,1,25,2.5,"2019-08-31 22:52:28",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,12,S,,,25.00,1,25,2.5,"2019-08-31 22:53:20",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,25,S,,,25.00,1,25,2.5,"2019-08-31 22:53:20",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,67,S,,,25.00,1,25,2.5,"2019-08-31 22:56:45",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,54,S,,,25.00,1,25,2.5,"2019-08-31 22:56:45",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,8,S,,,25.00,1,25,2.5,"2019-08-31 22:58:19",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,30,S,,,25.00,1,25,2.5,"2019-08-31 22:58:19",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,34,S,,,25.00,1,25,2.5,"2019-08-31 23:09:10",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,6,S,,,25.00,1,25,2.5,"2019-08-31 23:09:10",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,4,S,,,25.00,1,25,2.5,"2019-08-31 23:09:44",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,21,S,,,25.00,1,25,2.5,"2019-08-31 23:09:44",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,23,S,,,25.00,1,25,2.5,"2019-08-31 23:11:18",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,12,S,,,25.00,1,25,2.5,"2019-08-31 23:11:18",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,0,S,,,25.00,1,25,2.5,"2019-08-31 23:11:57",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,26,XL,,,25.00,1,25,2.5,"2019-08-31 23:11:57",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,34,XL,,,25.00,1,25,2.5,"2019-08-31 23:13:25",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,2,XL,,,25.00,1,25,2.5,"2019-08-31 23:13:25",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,11,XL,,,25.00,1,25,2.5,"2019-08-31 23:13:55",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,20,XL,,,25.00,1,25,2.5,"2019-08-31 23:13:55",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,34,XL,,,25.00,1,25,2.5,"2019-08-31 23:15:34",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,27,XL,,,25.00,1,25,2.5,"2019-08-31 23:15:34",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,15,YL,,,25.00,1,25,2.5,"2019-08-31 23:16:17",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,3,YL,,,25.00,1,25,2.5,"2019-08-31 23:16:17",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,28,YL,,,25.00,1,25,2.5,"2019-08-31 23:16:59",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,0,YL,,,25.00,1,25,2.5,"2019-08-31 23:16:59",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,2,YL,,,25.00,1,25,2.5,"2019-08-31 23:18:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,36,YL,,,25.00,1,25,2.5,"2019-08-31 23:18:38",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,13,YL,,,25.00,1,25,2.5,"2019-08-31 23:19:09",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,22,YL,,,25.00,1,25,2.5,"2019-08-31 23:19:09",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,22,YL,,,25.00,1,25,2.5,"2019-08-31 23:20:11",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,10,YL,,,25.00,1,25,2.5,"2019-08-31 23:20:11",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,33,YL,,,25.00,1,25,2.5,"2019-08-31 23:20:57",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,30,YL,,,25.00,1,25,2.5,"2019-08-31 23:20:57",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,30,YL,,,25.00,1,25,2.5,"2019-08-31 23:21:28",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,33,YL,,,25.00,1,25,2.5,"2019-08-31 23:21:28",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,21,YL,,,25.00,1,25,2.5,"2019-08-31 23:22:05",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,30,YL,,,25.00,1,25,2.5,"2019-08-31 23:22:05",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,19,YL,,,25.00,1,25,2.5,"2019-08-31 23:22:43",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,13,YL,,,25.00,1,25,2.5,"2019-08-31 23:22:43",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,2,YL,,,25.00,1,25,2.5,"2019-08-31 23:23:07",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,7,YL,,,25.00,1,25,2.5,"2019-08-31 23:23:07",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,21,YL,,,25.00,1,25,2.5,"2019-08-31 23:24:00",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,0,YL,,,25.00,1,25,2.5,"2019-08-31 23:24:00",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,17,YL,,,25.00,1,25,2.5,"2019-08-31 23:24:33",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,17,YL,,,25.00,1,25,2.5,"2019-08-31 23:24:33",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,53,YL,,,25.00,1,25,2.5,"2019-08-31 23:25:07",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,6,YL,,,25.00,1,25,2.5,"2019-08-31 23:25:07",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,5,YM,,,25.00,1,25,2.5,"2019-08-31 23:25:33",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,3,YM,,,25.00,1,25,2.5,"2019-08-31 23:25:33",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,33,YM,,,25.00,1,25,2.5,"2019-08-31 23:26:05",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,23,YM,,,25.00,1,25,2.5,"2019-08-31 23:26:05",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,8,YM,,,25.00,1,25,2.5,"2019-08-31 23:26:49",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,34,YM,,,25.00,1,25,2.5,"2019-08-31 23:26:49",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,23,YM,,,25.00,1,25,2.5,"2019-08-31 23:27:19",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,2,YM,,,25.00,1,25,2.5,"2019-08-31 23:27:19",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,10,YM,,,25.00,1,25,2.5,"2019-08-31 23:27:51",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,28,YM,,,25.00,1,25,2.5,"2019-08-31 23:27:51",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,18,YM,,,25.00,1,25,2.5,"2019-08-31 23:29:05",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,23,YM,,,25.00,1,25,2.5,"2019-08-31 23:29:05",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,5,YM,,,25.00,1,25,2.5,"2019-08-31 23:29:36",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,29,YS,,,25.00,1,25,2.5,"2019-08-31 23:31:02",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,5,YS,,,25.00,1,25,2.5,"2019-08-31 23:31:19",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,1,YS,,,25.00,1,25,2.5,"2019-08-31 23:31:47",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,21,YXL,,,25.00,1,25,2.5,"2019-08-31 23:32:15",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,33,YXL,,,25.00,1,25,2.5,"2019-08-31 23:32:15",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,11,YXL,,,25.00,1,25,2.5,"2019-08-31 23:32:45",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,10,YXL,,,25.00,1,25,2.5,"2019-08-31 23:32:45",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,9,YXL,,,25.00,1,25,2.5,"2019-08-31 23:33:24",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,20,YXL,,,25.00,1,25,2.5,"2019-08-31 23:33:24",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,3,YXL,,,25.00,1,25,2.5,"2019-08-31 23:34:02",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,7,YXL,,,25.00,1,25,2.5,"2019-08-31 23:34:02",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,15,YXL,,,25.00,1,25,2.5,"2019-08-31 23:34:28",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,11,YXL,,,25.00,1,25,2.5,"2019-08-31 23:34:28",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,30,YXL,,,25.00,1,25,2.5,"2019-08-31 23:34:55",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,10,YXL,,,25.00,1,25,2.5,"2019-08-31 23:34:55",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,0,YXL,,,25.00,1,25,2.5,"2019-08-31 23:35:27",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,33,YXL,,,25.00,1,25,2.5,"2019-08-31 23:35:27",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,11,YXL,,,25.00,1,25,2.5,"2019-08-31 23:35:56",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,23,YXL,,,25.00,1,25,2.5,"2019-08-31 23:35:56",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
Limitless,"Reversible Jersey",,21,YXL,,,25.00,1,25,2.5,"2019-08-31 23:36:11",20190901-0181,dawaun@limitlessbasketball.com
|
||||||
|
4
daily_order_reports/daily_order_report_2019-09-01.csv
Normal file
4
daily_order_reports/daily_order_report_2019-09-01.csv
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
StoreName,ProductName,NAME,NUMBER,Size,JerseySize,ShortsSize,Price,Quantity,TotalPrice,Tax,DateCreated,InvoiceNumber,Payer_Email
|
||||||
|
"Bruton Basketball","Long Sleeve T Shirt",,,2XL,,,45.00,1,45,4.5,"2019-09-01 17:38:41",20190901-0182,clare.davis@fire.tas.gov.au
|
||||||
|
"Bruton Basketball","T Shirt",,,2XL,,,35.00,1,35,3.5,"2019-09-01 17:39:01",20190901-0182,clare.davis@fire.tas.gov.au
|
||||||
|
"Bruton Basketball","Long Sleeve Hoodie",,,3XL,,,50.00,1,50,5,"2019-09-01 17:39:19",20190901-0182,clare.davis@fire.tas.gov.au
|
||||||
|
7
daily_order_reports/daily_order_report_2019-10-26.csv
Normal file
7
daily_order_reports/daily_order_report_2019-10-26.csv
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
StoreName,ProductName,NAME,NUMBER,Size,JerseySize,ShortsSize,Price,Quantity,TotalPrice,Tax,DateCreated,InvoiceNumber,Payer_Email
|
||||||
|
Ice,"Practice Jersey Reversible",SIMON,55,YM,,,30.00,1,30,3,"2019-10-26 09:17:16",20191026-0275,simondj55@gmail.com
|
||||||
|
"San Diego Bulldogs","Long Sleeve Hoodie",,,YXL,,,45.00,1,45,4.5,"2019-10-26 17:50:31",20191026-0276,sjones023@att.net
|
||||||
|
"San Diego Bulldogs",Backpack,"MJ ",23,,,,70.00,1,70,7,"2019-10-26 17:51:14",20191026-0276,sjones023@att.net
|
||||||
|
Wauconda,"Game Day Reversible uniform",PIEHL,12,,L,L,65.00,1,65,6.5,"2019-10-26 18:12:46",20191026-0277,aprilo99@aol.com
|
||||||
|
Wauconda,"Dry fit Long Sleeve T Shirt",,,L,,,30.00,1,30,3,"2019-10-26 18:21:16",20191026-0277,aprilo99@aol.com
|
||||||
|
Wauconda,socks,,,,,,12.00,1,12,1.2000000000000002,"2019-10-26 18:21:33",20191026-0277,aprilo99@aol.com
|
||||||
|
633
daily_reports_with_image.php
Normal file
633
daily_reports_with_image.php
Normal file
@@ -0,0 +1,633 @@
|
|||||||
|
<?php
|
||||||
|
include 'dbconfig.php';
|
||||||
|
require("phpmailer/class.phpmailer.php");
|
||||||
|
date_default_timezone_set('America/Chicago');
|
||||||
|
// $dateToday = date('Y-m-d');
|
||||||
|
// $dateToday = '2019-08-29';
|
||||||
|
$dateToday = $_GET['d'];
|
||||||
|
$dateTimeToday = date("Y-m-d H:i:s");
|
||||||
|
|
||||||
|
|
||||||
|
function getSubItem($date){
|
||||||
|
|
||||||
|
include 'dbconfig.php';
|
||||||
|
|
||||||
|
$q = $conn->prepare("SELECT t.StoreName, o.ProductId, o.FormUsed, o.ProductName, o.Name, o.Number, o.Size, o.JerseySize, o.ShortsSize, o.Price, o.Quantity, (o.Price * o.Quantity) AS TotalPrice, ((o.Price * o.Quantity) * 0.10) AS Tax,
|
||||||
|
o.DateCreated, pd.InvoiceNumber, pd.Payer_Email FROM orders AS o
|
||||||
|
INNER JOIN payment_details AS pd ON pd.CartKey = o.CartKey
|
||||||
|
INNER JOIN teamstores AS t ON t.Id = o.StoreId
|
||||||
|
WHERE o.DateCreated BETWEEN '$date 00:00:00' AND '$date 23:59:00'
|
||||||
|
ORDER BY o.DateCreated ASC, o.Number ASC");
|
||||||
|
|
||||||
|
$q->execute();
|
||||||
|
$result = $q->fetchAll();
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getItemImages($pid){
|
||||||
|
|
||||||
|
include 'dbconfig.php';
|
||||||
|
|
||||||
|
$q = $conn->prepare("SELECT * FROM teamstore_product_thumbnails WHERE ProductId = :pid ORDER BY Ordering ASC");
|
||||||
|
|
||||||
|
$q->execute(array(':pid'=>$pid));
|
||||||
|
$result = $q->fetchAll();
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
$array_orders = getSubItem($dateToday);
|
||||||
|
// var_dump(getItemImages(88));
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta name="viewport" content="width=device-width" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
|
<title>Order Details</title>
|
||||||
|
<style>
|
||||||
|
img {
|
||||||
|
border: none;
|
||||||
|
-ms-interpolation-mode: bicubic;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: #f6f6f6;
|
||||||
|
font-family: sans-serif;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1.4;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
-ms-text-size-adjust: 100%;
|
||||||
|
-webkit-text-size-adjust: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse: separate;
|
||||||
|
mso-table-lspace: 0pt;
|
||||||
|
mso-table-rspace: 0pt;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
table td {
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-size: 10px;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* -------------------------------------
|
||||||
|
BODY & CONTAINER
|
||||||
|
------------------------------------- */
|
||||||
|
|
||||||
|
/* Set a max-width, and make it display as block so it will automatically stretch to that width, but will also shrink down on a phone or something */
|
||||||
|
.container {
|
||||||
|
display: block;
|
||||||
|
margin: 0 auto !important;
|
||||||
|
/* makes it centered */
|
||||||
|
max-width: 880px;
|
||||||
|
padding: 10px;
|
||||||
|
width: 880px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This should also be a block element, so that it will fill 100% of the .container */
|
||||||
|
.content {
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: block;
|
||||||
|
margin: 0 auto;
|
||||||
|
max-width: 880px;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------
|
||||||
|
HEADER, FOOTER, MAIN
|
||||||
|
------------------------------------- */
|
||||||
|
.main {
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 3px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wrapper {
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-block {
|
||||||
|
padding-bottom: 10px;
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
clear: both;
|
||||||
|
margin-top: 10px;
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer td,
|
||||||
|
.footer p,
|
||||||
|
.footer span,
|
||||||
|
.footer a {
|
||||||
|
color: #999999;
|
||||||
|
font-size: 12px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------
|
||||||
|
TYPOGRAPHY
|
||||||
|
------------------------------------- */
|
||||||
|
h1,
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
h4 {
|
||||||
|
color: #000000;
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 1.4;
|
||||||
|
margin: 0;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 35px;
|
||||||
|
font-weight: 300;
|
||||||
|
text-align: center;
|
||||||
|
text-transform: capitalize;
|
||||||
|
}
|
||||||
|
|
||||||
|
p,
|
||||||
|
ul,
|
||||||
|
ol {
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: normal;
|
||||||
|
margin: 0;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
p li,
|
||||||
|
ul li,
|
||||||
|
ol li {
|
||||||
|
list-style-position: inside;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #3498db;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------
|
||||||
|
BUTTONS
|
||||||
|
------------------------------------- */
|
||||||
|
.btn {
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn > tbody > tr > td {
|
||||||
|
padding-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn table {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
.btn table td {
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 5px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn a {
|
||||||
|
background-color: #ffffff;
|
||||||
|
border: solid 1px #3498db;
|
||||||
|
border-radius: 5px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
color: #3498db;
|
||||||
|
cursor: pointer;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin: 0;
|
||||||
|
padding: 12px 25px;
|
||||||
|
text-decoration: none;
|
||||||
|
text-transform: capitalize;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary table td {
|
||||||
|
background-color: #3498db;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary a {
|
||||||
|
background-color: #3498db;
|
||||||
|
border-color: #3498db;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------
|
||||||
|
OTHER STYLES THAT MIGHT BE USEFUL
|
||||||
|
------------------------------------- */
|
||||||
|
.last {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.first {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.align-center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.align-right {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.align-left {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clear {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mt0 {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mb0 {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preheader {
|
||||||
|
color: transparent;
|
||||||
|
display: none;
|
||||||
|
height: 0;
|
||||||
|
max-height: 0;
|
||||||
|
max-width: 0;
|
||||||
|
opacity: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
mso-hide: all;
|
||||||
|
visibility: hidden;
|
||||||
|
width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.powered-by a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
border: 0;
|
||||||
|
border-bottom: 1px solid #f6f6f6;
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------
|
||||||
|
RESPONSIVE AND MOBILE FRIENDLY STYLES
|
||||||
|
------------------------------------- */
|
||||||
|
@media only screen and (max-width: 620px) {
|
||||||
|
table[class=body] h1 {
|
||||||
|
font-size: 28px !important;
|
||||||
|
margin-bottom: 10px !important;
|
||||||
|
}
|
||||||
|
table[class=body] p,
|
||||||
|
table[class=body] ul,
|
||||||
|
table[class=body] ol,
|
||||||
|
table[class=body] td,
|
||||||
|
table[class=body] span,
|
||||||
|
table[class=body] a {
|
||||||
|
font-size: 12px !important;
|
||||||
|
}
|
||||||
|
table[class=body] .wrapper,
|
||||||
|
table[class=body] .article {
|
||||||
|
padding: 10px !important;
|
||||||
|
}
|
||||||
|
table[class=body] .content {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
table[class=body] .container {
|
||||||
|
padding: 0 !important;
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
table[class=body] .main {
|
||||||
|
border-left-width: 0 !important;
|
||||||
|
border-radius: 0 !important;
|
||||||
|
border-right-width: 0 !important;
|
||||||
|
}
|
||||||
|
table[class=body] .btn table {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
table[class=body] .btn a {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
table[class=body] .img-responsive {
|
||||||
|
height: auto !important;
|
||||||
|
max-width: 100% !important;
|
||||||
|
width: auto !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------
|
||||||
|
PRESERVE THESE STYLES IN THE HEAD
|
||||||
|
------------------------------------- */
|
||||||
|
@media all {
|
||||||
|
.ExternalClass {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.ExternalClass,
|
||||||
|
.ExternalClass p,
|
||||||
|
.ExternalClass span,
|
||||||
|
.ExternalClass font,
|
||||||
|
.ExternalClass td,
|
||||||
|
.ExternalClass div {
|
||||||
|
line-height: 100%;
|
||||||
|
}
|
||||||
|
.apple-link a {
|
||||||
|
color: inherit !important;
|
||||||
|
font-family: inherit !important;
|
||||||
|
font-size: inherit !important;
|
||||||
|
font-weight: inherit !important;
|
||||||
|
line-height: inherit !important;
|
||||||
|
text-decoration: none !important;
|
||||||
|
}
|
||||||
|
.btn-primary table td:hover {
|
||||||
|
background-color: #34495e !important;
|
||||||
|
}
|
||||||
|
.btn-primary a:hover {
|
||||||
|
background-color: #34495e !important;
|
||||||
|
border-color: #34495e !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.table-bordered td, th {
|
||||||
|
border: 1px solid black;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.previewImage {
|
||||||
|
height: 200px;
|
||||||
|
overflow: hidden;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
.items tr {
|
||||||
|
page-break-inside:avoid;
|
||||||
|
position:relative;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@page {
|
||||||
|
size: 18cm 26.7cm;
|
||||||
|
margin: 1cm;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tbl_subitem tr td{
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body class="" onload="window.print()">
|
||||||
|
|
||||||
|
<table role="presentation" border="0" cellpadding="0" cellspacing="0" class="body">
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td class="container">
|
||||||
|
<div class="content">
|
||||||
|
<!-- START CENTERED WHITE CONTAINER -->
|
||||||
|
<table role="presentation" class="main">
|
||||||
|
<!-- START MAIN CONTENT AREA -->
|
||||||
|
<tr>
|
||||||
|
<td class="wrapper">
|
||||||
|
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<h3 class="align-center" style="font-size: 15px;"><b>Daily Reports <?php echo $dateToday ?></b> </h3>
|
||||||
|
<br>
|
||||||
|
<?php
|
||||||
|
$q = $conn->prepare("SELECT t.StoreName, o.ProductId, o.FormUsed, o.ProductName, o.NAME, o.NUMBER, o.Size, o.JerseySize, o.ShortsSize, o.Price, o.Quantity, (o.Price * o.Quantity) AS TotalPrice, ((o.Price * o.Quantity) * 0.10) AS Tax,
|
||||||
|
o.DateCreated, pd.InvoiceNumber, pd.Payer_Email FROM orders AS o
|
||||||
|
INNER JOIN payment_details AS pd ON pd.CartKey = o.CartKey
|
||||||
|
INNER JOIN teamstores AS t ON t.Id = o.StoreId
|
||||||
|
WHERE o.DateCreated BETWEEN '$dateToday 00:00:00' AND '$dateToday 23:59:00'
|
||||||
|
GROUP BY o.ProductId
|
||||||
|
ORDER BY o.DateCreated");
|
||||||
|
$q->execute();
|
||||||
|
$result = $q->rowCount();
|
||||||
|
|
||||||
|
if($result > 0){
|
||||||
|
// $i = 1;
|
||||||
|
while ($row = $q->fetch()) {
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="items-parent" style="border: 1px solid #e2e2e2; padding: 10px; margin-bottom: 10px;">
|
||||||
|
|
||||||
|
<table class="items" role="presentation" border="0" cellpadding="0" cellspacing="0" >
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<h2><b>Store: </b></h2>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<h2><?php echo $row['StoreName'] ?></h2>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<div style="font-size: 12px;">
|
||||||
|
<a href="#">
|
||||||
|
<?php echo $row['ProductName'] ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div style="text-align: center;">
|
||||||
|
<!-- -->
|
||||||
|
<?php
|
||||||
|
$itemImages = getItemImages($row['ProductId']);
|
||||||
|
foreach($itemImages as $thumb_key => $thumb_val){
|
||||||
|
// echo $thumb_val['Image'];
|
||||||
|
echo '<img style="height: 150px; overflow: hidden; object-fit: contain;" src="https://crewsportswear.app/images/'.$thumb_val['Image'].'"> ';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<table id="tbl_subitem" class="table table-condensed table-bordered" style="width: 100%; border-collapse: collapse;">
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if($row['FormUsed']=="jersey-and-shorts-form"){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><b>#</b></td>
|
||||||
|
<td><b>Name</b></td>
|
||||||
|
<td><b>Number</b></td>
|
||||||
|
<td><b>Jersey Size</b></td>
|
||||||
|
<td><b>Shorts Size</b></td>
|
||||||
|
<td><b>Quantity</b></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}elseif($row['FormUsed']=="tshirt-form"){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><b>#</b></td>
|
||||||
|
<td><b>Size</b></td>
|
||||||
|
<td><b>Quantity</b></td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}elseif($row['FormUsed']=="quantity-form"){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td>Quantity</b></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}elseif($row['FormUsed']=="name-number-form"){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><b>#</b></td>
|
||||||
|
<td><b>Name</b></td>
|
||||||
|
<td><b>Number</b></td>
|
||||||
|
<td><b>Quantity</b></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}elseif($row['FormUsed']=="name-number-size-form"){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><b>#</b></td>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Number</th>
|
||||||
|
<th>Size</th>
|
||||||
|
<th>Quantity</th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}elseif($row['FormUsed']=="number-form"){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><b>#</b></td>
|
||||||
|
<th>Number</th>
|
||||||
|
<th>Quantity</th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}else{
|
||||||
|
// else
|
||||||
|
}
|
||||||
|
|
||||||
|
$i=1;
|
||||||
|
|
||||||
|
foreach($array_orders as $key => $val){
|
||||||
|
if($val['ProductId'] == $row['ProductId']){
|
||||||
|
|
||||||
|
if($row['FormUsed']=="jersey-and-shorts-form"){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?php echo $i++ ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php echo ($val['Name'] !== "") ? : '--' ?>
|
||||||
|
</td>
|
||||||
|
<td><?php echo $val['Number'] ?> </td>
|
||||||
|
<td><?php echo $val['JerseySize'] ?> </td>
|
||||||
|
<td><?php echo $val['ShortsSize'] ?> </td>
|
||||||
|
<td><?php echo $val['Quantity'] ?> </td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}elseif($row['FormUsed']=="tshirt-form"){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $i++ ?> </td>
|
||||||
|
<td><?php echo $val['Size'] ?> </td>
|
||||||
|
<td><?php echo $val['Quantity'] ?> </td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}elseif($row['FormUsed']=="quantity-form"){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $i++ ?> </td>
|
||||||
|
<td><?php echo $val['Quantity'] ?> </td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}elseif($row['FormUsed']=="name-number-form"){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $i++ ?> </td>
|
||||||
|
<td><?php echo $val['Name'] ?> </td>
|
||||||
|
<td><?php echo $val['Number'] ?> </td>
|
||||||
|
<td><?php echo $val['Quantity'] ?> </td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}elseif($row['FormUsed']=="name-number-size-form"){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $i++ ?> </td>
|
||||||
|
<td><?php echo $val['Name'] ?> </td>
|
||||||
|
<td><?php echo $val['Number'] ?> </td>
|
||||||
|
<td><?php echo $val['Size'] ?> </td>
|
||||||
|
<td><?php echo $val['Quantity'] ?> </td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}elseif($row['FormUsed']=="number-form"){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $i++ ?> </td>
|
||||||
|
<td><?php echo $val['Number'] ?> </td>
|
||||||
|
<td><?php echo $val['Quantity'] ?> </td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!-- table header -->
|
||||||
|
<!-- table body -->
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<!-- END MAIN CONTENT AREA -->
|
||||||
|
</table>
|
||||||
|
<!-- END CENTERED WHITE CONTAINER -->
|
||||||
|
|
||||||
|
<!-- START FOOTER -->
|
||||||
|
<div class="footer">
|
||||||
|
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="content-block">
|
||||||
|
<span class="apple-link">Copyright © 2019 <a href="https://crewsportswear.com">crewsportswear.com</a>. All rights reserved.</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- END FOOTER -->
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
18
dbconfig.php
Normal file
18
dbconfig.php
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$host = "localhost";
|
||||||
|
$username = "root";
|
||||||
|
$password = "";
|
||||||
|
$db = "custom_design";
|
||||||
|
|
||||||
|
try{
|
||||||
|
// database connection
|
||||||
|
$conn = new PDO("mysql:host=$host;dbname=$db",$username,$password);
|
||||||
|
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
}
|
||||||
|
catch(PDOException $pe)
|
||||||
|
{
|
||||||
|
die('Connection error, because: ' .$pe->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
$baseURL = 'http://'.$_SERVER['HTTP_HOST'] . '/bulacanlibrary/';
|
||||||
20
email.log
Normal file
20
email.log
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
2019-07-19 14:07:55 successfully sent
|
||||||
|
2019-07-19 14:08:11 successfully sent
|
||||||
|
2019-07-19 14:08:38 Mailer Error: The following From address failed: orders@crewsportswear.com : MAIL not accepted from server,530,5.5.1 Authentication Required. Learn more at
|
||||||
|
530 5.5.1 https://support.google.com/mail/?p=WantAuthError b6sm27496175pgq.26 - gsmtp
|
||||||
|
<p>SMTP server error: 5.5.1 Authentication Required. Learn more at
|
||||||
|
530 5.5.1 https://support.google.com/mail/?p=WantAuthError b6sm27496175pgq.26 - gsmtp
|
||||||
|
</p>
|
||||||
|
<p>SMTP server error: 5.5.1 Authentication Required. Learn more at
|
||||||
|
530 5.5.1 https://support.google.com/mail/?p=WantAuthError b6sm27496175pgq.26 - gsmtp
|
||||||
|
</p>
|
||||||
|
\n2019-07-19 14:09:07 successfully sent
|
||||||
|
2019-07-19 14:09:41 successfully sent
|
||||||
|
2019-07-19 14:10:08 No order for today
|
||||||
|
2019-07-19 14:10:15 No order for today
|
||||||
|
2019-09-03 05:58:55 Mailer Error: Message body empty\n2019-09-03 05:59:21 Mailer Error: Message body empty\n2019-09-03 06:00:17 Mailer Error: Message body empty\n2019-09-03 06:00:18 Mailer Error: Message body empty\n2019-09-03 06:00:50 Mailer Error: Message body empty\n2019-09-03 06:00:53 Mailer Error: Message body empty\n2019-09-03 06:00:53 Mailer Error: Message body empty\n2019-09-03 06:00:53 Mailer Error: Message body empty\n2019-09-03 06:00:57 Mailer Error: Message body empty\n2019-09-03 06:01:33 successfully sent
|
||||||
|
2019-09-03 06:02:58 successfully sent
|
||||||
|
2019-09-03 06:06:03 successfully sent
|
||||||
|
2019-09-03 06:07:00 successfully sent
|
||||||
|
2019-10-30 07:37:24 Mailer Error: The following From address failed: orders@crewsportswear.com : Called Mail() without being connected\n2019-10-30 07:38:30 successfully sent
|
||||||
|
2019-10-30 07:39:51 successfully sent
|
||||||
103
index.php
Normal file
103
index.php
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
include 'dbconfig.php';
|
||||||
|
require("phpmailer/class.phpmailer.php");
|
||||||
|
date_default_timezone_set('America/Chicago');
|
||||||
|
$dateToday = date('Y-m-d');
|
||||||
|
$dateTimeToday = date("Y-m-d H:i:s");
|
||||||
|
|
||||||
|
//grab all rows from the table where state is "new" and put into array
|
||||||
|
|
||||||
|
$q = $conn->prepare("SELECT t.StoreName, o.CartKey, o.ProductName, o.NAME, o.NUMBER, o.Size, o.JerseySize, o.ShortsSize, o.Price, o.Quantity, (o.Price * o.Quantity) AS TotalPrice, ((o.Price * o.Quantity) * 0.10) AS Tax,
|
||||||
|
o.DateCreated, pd.InvoiceNumber, pd.Payer_Email FROM orders AS o
|
||||||
|
INNER JOIN payment_details AS pd ON pd.CartKey = o.CartKey
|
||||||
|
INNER JOIN teamstores AS t ON t.Id = o.StoreId
|
||||||
|
WHERE o.DateCreated BETWEEN '$dateToday 00:00:00' AND '$dateToday 23:59:00'
|
||||||
|
ORDER BY o.DateCreated");
|
||||||
|
$q->execute();
|
||||||
|
$result = $q->rowCount();
|
||||||
|
|
||||||
|
|
||||||
|
if($result > 0){
|
||||||
|
$invoice_array = array();
|
||||||
|
|
||||||
|
$filename = 'daily_order_report_'.$dateToday.'.csv';
|
||||||
|
$headers = array('StoreName', 'ProductName', 'NAME', 'NUMBER', 'Size', 'JerseySize', 'ShortsSize', 'Price', 'Quantity', 'TotalPrice', 'Tax', 'DateCreated', 'InvoiceNumber', 'Payer_Email');
|
||||||
|
$fp = fopen('daily_order_reports/'.$filename, 'w');
|
||||||
|
fputcsv($fp, $headers);
|
||||||
|
|
||||||
|
while ($row = $q->fetch()) {
|
||||||
|
|
||||||
|
$value = $row['CartKey'] . "|" . $row['InvoiceNumber'];
|
||||||
|
|
||||||
|
if(!in_array($value, $invoice_array, true)){
|
||||||
|
array_push($invoice_array, $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
$lineData = array($row['StoreName'], $row['ProductName'], $row['NAME'], $row['NUMBER'], $row['Size'], $row['JerseySize'], $row['ShortsSize'], $row['Price'], $row['Quantity'], $row['TotalPrice'], $row['Tax'], $row['DateCreated'], $row['InvoiceNumber'], $row['Payer_Email']);
|
||||||
|
fputcsv($fp, $lineData);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$report_link = "https://www.crewsportswear.com/email_reports/daily_reports_with_image.php?d=". $dateToday;
|
||||||
|
$body = "<html>";
|
||||||
|
$body .= "<body>";
|
||||||
|
$body .= "<p> Please download the attached file for today's order report.</p>";
|
||||||
|
$body .= " <br><br>";
|
||||||
|
$body .= "<p>For the order report with image please <a href='".$report_link ."'>click here</a>.</p>";
|
||||||
|
$body .= "<p>####################################</p>";
|
||||||
|
$body .= "<p>Order Details per Invoice</p>";
|
||||||
|
|
||||||
|
foreach($invoice_array as $invoice){
|
||||||
|
$v = explode("|", $invoice);
|
||||||
|
$body .= "<div>Invoice Number: <a href='http://admin.crewsportswear.com:23000/admin/orders/view/" . $v['0']."/print'>" . $v['1'] . "</a></div>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$body .= "</body>";
|
||||||
|
$body .= "</html>";
|
||||||
|
|
||||||
|
$mail = new PHPMailer();
|
||||||
|
$mail->IsSMTP();
|
||||||
|
$mail->SMTPAuth = true;
|
||||||
|
// $mail->SMTPDebug = 3; // uncomment for debug mode.
|
||||||
|
|
||||||
|
$mail->SMTPSecure = 'tls';
|
||||||
|
$mail->Host = "smtp.gmail.com";
|
||||||
|
$mail->Port = "587";
|
||||||
|
|
||||||
|
//gmail account
|
||||||
|
$mail->Username = 'no-reply@crewsportswear.com';
|
||||||
|
$mail->Password = '20HustleHard19!';
|
||||||
|
|
||||||
|
$mail->SetFrom('orders@crewsportswear.com', 'CREW Daily Order Report');
|
||||||
|
|
||||||
|
$mail->addAddress('graphics@crewsportswear.com');
|
||||||
|
$mail->addBCC("webmaster@crewsportswear.com");
|
||||||
|
$mail->addBCC("angelo@crewsportswear.com");
|
||||||
|
|
||||||
|
$mail->addAttachment('daily_order_reports/'.$filename);
|
||||||
|
|
||||||
|
$mail->Subject = 'Daily Report ' . $dateToday;
|
||||||
|
$mail->Body = $body;
|
||||||
|
$mail->ErrorInfo;
|
||||||
|
$mail->IsHTML(true);
|
||||||
|
|
||||||
|
// return $mail->Send();
|
||||||
|
if(!$mail->Send()){
|
||||||
|
$msg = $dateTimeToday . "\t\t\tMailer Error: " . $mail->ErrorInfo .'\n';
|
||||||
|
file_put_contents('email.log', print_r($msg, true), FILE_APPEND);
|
||||||
|
|
||||||
|
}else {
|
||||||
|
$msg = $dateTimeToday . "\t\t\tsuccessfully sent\n";
|
||||||
|
file_put_contents('email.log', print_r($msg, true), FILE_APPEND);
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
$msg = $dateTimeToday . "\t\t\tNo order for today\n";
|
||||||
|
file_put_contents('email.log', print_r($msg, true), FILE_APPEND);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
3
phpmailer/.gitignore
vendored
Normal file
3
phpmailer/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
docs/phpdoc/
|
||||||
|
test/message.txt
|
||||||
|
test/testbootstrap.php
|
||||||
20
phpmailer/.travis.yml
Normal file
20
phpmailer/.travis.yml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
language: php
|
||||||
|
php:
|
||||||
|
- 5.5
|
||||||
|
- 5.4
|
||||||
|
- 5.3
|
||||||
|
before_install:
|
||||||
|
- sudo apt-get update -qq
|
||||||
|
- sudo apt-get install -y -qq postfix
|
||||||
|
before_script:
|
||||||
|
- sudo service postfix stop
|
||||||
|
- smtp-sink -d "%d.%H.%M.%S" localhost:2500 1000 &
|
||||||
|
- cd test
|
||||||
|
- cp testbootstrap-dist.php testbootstrap.php
|
||||||
|
- chmod +x fakesendmail.sh
|
||||||
|
- sudo mkdir -p /var/qmail/bin
|
||||||
|
- sudo cp fakesendmail.sh /var/qmail/bin/sendmail
|
||||||
|
- sudo cp fakesendmail.sh /usr/sbin/sendmail
|
||||||
|
- echo 'sendmail_path = "/usr/sbin/sendmail -t -i "' | sudo tee "/home/travis/.phpenv/versions/`php -i|grep "PHP Version"|head -n 1|grep -o -P '\d+\.\d+\.\d+.*'`/etc/conf.d/sendmail.ini"
|
||||||
|
script:
|
||||||
|
- phpunit phpmailerTest
|
||||||
504
phpmailer/LICENSE
Normal file
504
phpmailer/LICENSE
Normal file
@@ -0,0 +1,504 @@
|
|||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
Version 2.1, February 1999
|
||||||
|
|
||||||
|
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||||
|
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
[This is the first released version of the Lesser GPL. It also counts
|
||||||
|
as the successor of the GNU Library Public License, version 2, hence
|
||||||
|
the version number 2.1.]
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
Licenses are intended to guarantee your freedom to share and change
|
||||||
|
free software--to make sure the software is free for all its users.
|
||||||
|
|
||||||
|
This license, the Lesser General Public License, applies to some
|
||||||
|
specially designated software packages--typically libraries--of the
|
||||||
|
Free Software Foundation and other authors who decide to use it. You
|
||||||
|
can use it too, but we suggest you first think carefully about whether
|
||||||
|
this license or the ordinary General Public License is the better
|
||||||
|
strategy to use in any particular case, based on the explanations below.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom of use,
|
||||||
|
not price. Our General Public Licenses are designed to make sure that
|
||||||
|
you have the freedom to distribute copies of free software (and charge
|
||||||
|
for this service if you wish); that you receive source code or can get
|
||||||
|
it if you want it; that you can change the software and use pieces of
|
||||||
|
it in new free programs; and that you are informed that you can do
|
||||||
|
these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
distributors to deny you these rights or to ask you to surrender these
|
||||||
|
rights. These restrictions translate to certain responsibilities for
|
||||||
|
you if you distribute copies of the library or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of the library, whether gratis
|
||||||
|
or for a fee, you must give the recipients all the rights that we gave
|
||||||
|
you. You must make sure that they, too, receive or can get the source
|
||||||
|
code. If you link other code with the library, you must provide
|
||||||
|
complete object files to the recipients, so that they can relink them
|
||||||
|
with the library after making changes to the library and recompiling
|
||||||
|
it. And you must show them these terms so they know their rights.
|
||||||
|
|
||||||
|
We protect your rights with a two-step method: (1) we copyright the
|
||||||
|
library, and (2) we offer you this license, which gives you legal
|
||||||
|
permission to copy, distribute and/or modify the library.
|
||||||
|
|
||||||
|
To protect each distributor, we want to make it very clear that
|
||||||
|
there is no warranty for the free library. Also, if the library is
|
||||||
|
modified by someone else and passed on, the recipients should know
|
||||||
|
that what they have is not the original version, so that the original
|
||||||
|
author's reputation will not be affected by problems that might be
|
||||||
|
introduced by others.
|
||||||
|
|
||||||
|
Finally, software patents pose a constant threat to the existence of
|
||||||
|
any free program. We wish to make sure that a company cannot
|
||||||
|
effectively restrict the users of a free program by obtaining a
|
||||||
|
restrictive license from a patent holder. Therefore, we insist that
|
||||||
|
any patent license obtained for a version of the library must be
|
||||||
|
consistent with the full freedom of use specified in this license.
|
||||||
|
|
||||||
|
Most GNU software, including some libraries, is covered by the
|
||||||
|
ordinary GNU General Public License. This license, the GNU Lesser
|
||||||
|
General Public License, applies to certain designated libraries, and
|
||||||
|
is quite different from the ordinary General Public License. We use
|
||||||
|
this license for certain libraries in order to permit linking those
|
||||||
|
libraries into non-free programs.
|
||||||
|
|
||||||
|
When a program is linked with a library, whether statically or using
|
||||||
|
a shared library, the combination of the two is legally speaking a
|
||||||
|
combined work, a derivative of the original library. The ordinary
|
||||||
|
General Public License therefore permits such linking only if the
|
||||||
|
entire combination fits its criteria of freedom. The Lesser General
|
||||||
|
Public License permits more lax criteria for linking other code with
|
||||||
|
the library.
|
||||||
|
|
||||||
|
We call this license the "Lesser" General Public License because it
|
||||||
|
does Less to protect the user's freedom than the ordinary General
|
||||||
|
Public License. It also provides other free software developers Less
|
||||||
|
of an advantage over competing non-free programs. These disadvantages
|
||||||
|
are the reason we use the ordinary General Public License for many
|
||||||
|
libraries. However, the Lesser license provides advantages in certain
|
||||||
|
special circumstances.
|
||||||
|
|
||||||
|
For example, on rare occasions, there may be a special need to
|
||||||
|
encourage the widest possible use of a certain library, so that it becomes
|
||||||
|
a de-facto standard. To achieve this, non-free programs must be
|
||||||
|
allowed to use the library. A more frequent case is that a free
|
||||||
|
library does the same job as widely used non-free libraries. In this
|
||||||
|
case, there is little to gain by limiting the free library to free
|
||||||
|
software only, so we use the Lesser General Public License.
|
||||||
|
|
||||||
|
In other cases, permission to use a particular library in non-free
|
||||||
|
programs enables a greater number of people to use a large body of
|
||||||
|
free software. For example, permission to use the GNU C Library in
|
||||||
|
non-free programs enables many more people to use the whole GNU
|
||||||
|
operating system, as well as its variant, the GNU/Linux operating
|
||||||
|
system.
|
||||||
|
|
||||||
|
Although the Lesser General Public License is Less protective of the
|
||||||
|
users' freedom, it does ensure that the user of a program that is
|
||||||
|
linked with the Library has the freedom and the wherewithal to run
|
||||||
|
that program using a modified version of the Library.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow. Pay close attention to the difference between a
|
||||||
|
"work based on the library" and a "work that uses the library". The
|
||||||
|
former contains code derived from the library, whereas the latter must
|
||||||
|
be combined with the library in order to run.
|
||||||
|
|
||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License Agreement applies to any software library or other
|
||||||
|
program which contains a notice placed by the copyright holder or
|
||||||
|
other authorized party saying it may be distributed under the terms of
|
||||||
|
this Lesser General Public License (also called "this License").
|
||||||
|
Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
A "library" means a collection of software functions and/or data
|
||||||
|
prepared so as to be conveniently linked with application programs
|
||||||
|
(which use some of those functions and data) to form executables.
|
||||||
|
|
||||||
|
The "Library", below, refers to any such software library or work
|
||||||
|
which has been distributed under these terms. A "work based on the
|
||||||
|
Library" means either the Library or any derivative work under
|
||||||
|
copyright law: that is to say, a work containing the Library or a
|
||||||
|
portion of it, either verbatim or with modifications and/or translated
|
||||||
|
straightforwardly into another language. (Hereinafter, translation is
|
||||||
|
included without limitation in the term "modification".)
|
||||||
|
|
||||||
|
"Source code" for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For a library, complete source code means
|
||||||
|
all the source code for all modules it contains, plus any associated
|
||||||
|
interface definition files, plus the scripts used to control compilation
|
||||||
|
and installation of the library.
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running a program using the Library is not restricted, and output from
|
||||||
|
such a program is covered only if its contents constitute a work based
|
||||||
|
on the Library (independent of the use of the Library in a tool for
|
||||||
|
writing it). Whether that is true depends on what the Library does
|
||||||
|
and what the program that uses the Library does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Library's
|
||||||
|
complete source code as you receive it, in any medium, provided that
|
||||||
|
you conspicuously and appropriately publish on each copy an
|
||||||
|
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||||
|
all the notices that refer to this License and to the absence of any
|
||||||
|
warranty; and distribute a copy of this License along with the
|
||||||
|
Library.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy,
|
||||||
|
and you may at your option offer warranty protection in exchange for a
|
||||||
|
fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Library or any portion
|
||||||
|
of it, thus forming a work based on the Library, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The modified work must itself be a software library.
|
||||||
|
|
||||||
|
b) You must cause the files modified to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
c) You must cause the whole of the work to be licensed at no
|
||||||
|
charge to all third parties under the terms of this License.
|
||||||
|
|
||||||
|
d) If a facility in the modified Library refers to a function or a
|
||||||
|
table of data to be supplied by an application program that uses
|
||||||
|
the facility, other than as an argument passed when the facility
|
||||||
|
is invoked, then you must make a good faith effort to ensure that,
|
||||||
|
in the event an application does not supply such function or
|
||||||
|
table, the facility still operates, and performs whatever part of
|
||||||
|
its purpose remains meaningful.
|
||||||
|
|
||||||
|
(For example, a function in a library to compute square roots has
|
||||||
|
a purpose that is entirely well-defined independent of the
|
||||||
|
application. Therefore, Subsection 2d requires that any
|
||||||
|
application-supplied function or table used by this function must
|
||||||
|
be optional: if the application does not supply it, the square
|
||||||
|
root function must still compute square roots.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Library,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Library, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote
|
||||||
|
it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Library.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Library
|
||||||
|
with the Library (or with a work based on the Library) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||||
|
License instead of this License to a given copy of the Library. To do
|
||||||
|
this, you must alter all the notices that refer to this License, so
|
||||||
|
that they refer to the ordinary GNU General Public License, version 2,
|
||||||
|
instead of to this License. (If a newer version than version 2 of the
|
||||||
|
ordinary GNU General Public License has appeared, then you can specify
|
||||||
|
that version instead if you wish.) Do not make any other change in
|
||||||
|
these notices.
|
||||||
|
|
||||||
|
Once this change is made in a given copy, it is irreversible for
|
||||||
|
that copy, so the ordinary GNU General Public License applies to all
|
||||||
|
subsequent copies and derivative works made from that copy.
|
||||||
|
|
||||||
|
This option is useful when you wish to copy part of the code of
|
||||||
|
the Library into a program that is not a library.
|
||||||
|
|
||||||
|
4. You may copy and distribute the Library (or a portion or
|
||||||
|
derivative of it, under Section 2) in object code or executable form
|
||||||
|
under the terms of Sections 1 and 2 above provided that you accompany
|
||||||
|
it with the complete corresponding machine-readable source code, which
|
||||||
|
must be distributed under the terms of Sections 1 and 2 above on a
|
||||||
|
medium customarily used for software interchange.
|
||||||
|
|
||||||
|
If distribution of object code is made by offering access to copy
|
||||||
|
from a designated place, then offering equivalent access to copy the
|
||||||
|
source code from the same place satisfies the requirement to
|
||||||
|
distribute the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
5. A program that contains no derivative of any portion of the
|
||||||
|
Library, but is designed to work with the Library by being compiled or
|
||||||
|
linked with it, is called a "work that uses the Library". Such a
|
||||||
|
work, in isolation, is not a derivative work of the Library, and
|
||||||
|
therefore falls outside the scope of this License.
|
||||||
|
|
||||||
|
However, linking a "work that uses the Library" with the Library
|
||||||
|
creates an executable that is a derivative of the Library (because it
|
||||||
|
contains portions of the Library), rather than a "work that uses the
|
||||||
|
library". The executable is therefore covered by this License.
|
||||||
|
Section 6 states terms for distribution of such executables.
|
||||||
|
|
||||||
|
When a "work that uses the Library" uses material from a header file
|
||||||
|
that is part of the Library, the object code for the work may be a
|
||||||
|
derivative work of the Library even though the source code is not.
|
||||||
|
Whether this is true is especially significant if the work can be
|
||||||
|
linked without the Library, or if the work is itself a library. The
|
||||||
|
threshold for this to be true is not precisely defined by law.
|
||||||
|
|
||||||
|
If such an object file uses only numerical parameters, data
|
||||||
|
structure layouts and accessors, and small macros and small inline
|
||||||
|
functions (ten lines or less in length), then the use of the object
|
||||||
|
file is unrestricted, regardless of whether it is legally a derivative
|
||||||
|
work. (Executables containing this object code plus portions of the
|
||||||
|
Library will still fall under Section 6.)
|
||||||
|
|
||||||
|
Otherwise, if the work is a derivative of the Library, you may
|
||||||
|
distribute the object code for the work under the terms of Section 6.
|
||||||
|
Any executables containing that work also fall under Section 6,
|
||||||
|
whether or not they are linked directly with the Library itself.
|
||||||
|
|
||||||
|
6. As an exception to the Sections above, you may also combine or
|
||||||
|
link a "work that uses the Library" with the Library to produce a
|
||||||
|
work containing portions of the Library, and distribute that work
|
||||||
|
under terms of your choice, provided that the terms permit
|
||||||
|
modification of the work for the customer's own use and reverse
|
||||||
|
engineering for debugging such modifications.
|
||||||
|
|
||||||
|
You must give prominent notice with each copy of the work that the
|
||||||
|
Library is used in it and that the Library and its use are covered by
|
||||||
|
this License. You must supply a copy of this License. If the work
|
||||||
|
during execution displays copyright notices, you must include the
|
||||||
|
copyright notice for the Library among them, as well as a reference
|
||||||
|
directing the user to the copy of this License. Also, you must do one
|
||||||
|
of these things:
|
||||||
|
|
||||||
|
a) Accompany the work with the complete corresponding
|
||||||
|
machine-readable source code for the Library including whatever
|
||||||
|
changes were used in the work (which must be distributed under
|
||||||
|
Sections 1 and 2 above); and, if the work is an executable linked
|
||||||
|
with the Library, with the complete machine-readable "work that
|
||||||
|
uses the Library", as object code and/or source code, so that the
|
||||||
|
user can modify the Library and then relink to produce a modified
|
||||||
|
executable containing the modified Library. (It is understood
|
||||||
|
that the user who changes the contents of definitions files in the
|
||||||
|
Library will not necessarily be able to recompile the application
|
||||||
|
to use the modified definitions.)
|
||||||
|
|
||||||
|
b) Use a suitable shared library mechanism for linking with the
|
||||||
|
Library. A suitable mechanism is one that (1) uses at run time a
|
||||||
|
copy of the library already present on the user's computer system,
|
||||||
|
rather than copying library functions into the executable, and (2)
|
||||||
|
will operate properly with a modified version of the library, if
|
||||||
|
the user installs one, as long as the modified version is
|
||||||
|
interface-compatible with the version that the work was made with.
|
||||||
|
|
||||||
|
c) Accompany the work with a written offer, valid for at
|
||||||
|
least three years, to give the same user the materials
|
||||||
|
specified in Subsection 6a, above, for a charge no more
|
||||||
|
than the cost of performing this distribution.
|
||||||
|
|
||||||
|
d) If distribution of the work is made by offering access to copy
|
||||||
|
from a designated place, offer equivalent access to copy the above
|
||||||
|
specified materials from the same place.
|
||||||
|
|
||||||
|
e) Verify that the user has already received a copy of these
|
||||||
|
materials or that you have already sent this user a copy.
|
||||||
|
|
||||||
|
For an executable, the required form of the "work that uses the
|
||||||
|
Library" must include any data and utility programs needed for
|
||||||
|
reproducing the executable from it. However, as a special exception,
|
||||||
|
the materials to be distributed need not include anything that is
|
||||||
|
normally distributed (in either source or binary form) with the major
|
||||||
|
components (compiler, kernel, and so on) of the operating system on
|
||||||
|
which the executable runs, unless that component itself accompanies
|
||||||
|
the executable.
|
||||||
|
|
||||||
|
It may happen that this requirement contradicts the license
|
||||||
|
restrictions of other proprietary libraries that do not normally
|
||||||
|
accompany the operating system. Such a contradiction means you cannot
|
||||||
|
use both them and the Library together in an executable that you
|
||||||
|
distribute.
|
||||||
|
|
||||||
|
7. You may place library facilities that are a work based on the
|
||||||
|
Library side-by-side in a single library together with other library
|
||||||
|
facilities not covered by this License, and distribute such a combined
|
||||||
|
library, provided that the separate distribution of the work based on
|
||||||
|
the Library and of the other library facilities is otherwise
|
||||||
|
permitted, and provided that you do these two things:
|
||||||
|
|
||||||
|
a) Accompany the combined library with a copy of the same work
|
||||||
|
based on the Library, uncombined with any other library
|
||||||
|
facilities. This must be distributed under the terms of the
|
||||||
|
Sections above.
|
||||||
|
|
||||||
|
b) Give prominent notice with the combined library of the fact
|
||||||
|
that part of it is a work based on the Library, and explaining
|
||||||
|
where to find the accompanying uncombined form of the same work.
|
||||||
|
|
||||||
|
8. You may not copy, modify, sublicense, link with, or distribute
|
||||||
|
the Library except as expressly provided under this License. Any
|
||||||
|
attempt otherwise to copy, modify, sublicense, link with, or
|
||||||
|
distribute the Library is void, and will automatically terminate your
|
||||||
|
rights under this License. However, parties who have received copies,
|
||||||
|
or rights, from you under this License will not have their licenses
|
||||||
|
terminated so long as such parties remain in full compliance.
|
||||||
|
|
||||||
|
9. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Library or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Library (or any work based on the
|
||||||
|
Library), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Library or works based on it.
|
||||||
|
|
||||||
|
10. Each time you redistribute the Library (or any work based on the
|
||||||
|
Library), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute, link with or modify the Library
|
||||||
|
subject to these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties with
|
||||||
|
this License.
|
||||||
|
|
||||||
|
11. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Library at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Library by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Library.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under any
|
||||||
|
particular circumstance, the balance of the section is intended to apply,
|
||||||
|
and the section as a whole is intended to apply in other circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
12. If the distribution and/or use of the Library is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Library under this License may add
|
||||||
|
an explicit geographical distribution limitation excluding those countries,
|
||||||
|
so that distribution is permitted only in or among countries not thus
|
||||||
|
excluded. In such case, this License incorporates the limitation as if
|
||||||
|
written in the body of this License.
|
||||||
|
|
||||||
|
13. The Free Software Foundation may publish revised and/or new
|
||||||
|
versions of the Lesser General Public License from time to time.
|
||||||
|
Such new versions will be similar in spirit to the present version,
|
||||||
|
but may differ in detail to address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Library
|
||||||
|
specifies a version number of this License which applies to it and
|
||||||
|
"any later version", you have the option of following the terms and
|
||||||
|
conditions either of that version or of any later version published by
|
||||||
|
the Free Software Foundation. If the Library does not specify a
|
||||||
|
license version number, you may choose any version ever published by
|
||||||
|
the Free Software Foundation.
|
||||||
|
|
||||||
|
14. If you wish to incorporate parts of the Library into other free
|
||||||
|
programs whose distribution conditions are incompatible with these,
|
||||||
|
write to the author to ask for permission. For software which is
|
||||||
|
copyrighted by the Free Software Foundation, write to the Free
|
||||||
|
Software Foundation; we sometimes make exceptions for this. Our
|
||||||
|
decision will be guided by the two goals of preserving the free status
|
||||||
|
of all derivatives of our free software and of promoting the sharing
|
||||||
|
and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||||
|
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||||
|
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||||
|
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||||
|
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||||
|
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||||
|
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||||
|
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||||
|
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||||
|
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||||
|
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||||
|
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||||
|
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||||
|
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||||
|
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||||
|
DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Libraries
|
||||||
|
|
||||||
|
If you develop a new library, and you want it to be of the greatest
|
||||||
|
possible use to the public, we recommend making it free software that
|
||||||
|
everyone can redistribute and change. You can do so by permitting
|
||||||
|
redistribution under these terms (or, alternatively, under the terms of the
|
||||||
|
ordinary General Public License).
|
||||||
|
|
||||||
|
To apply these terms, attach the following notices to the library. It is
|
||||||
|
safest to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least the
|
||||||
|
"copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the library's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||||
|
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1990
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
That's all there is to it!
|
||||||
|
|
||||||
|
|
||||||
134
phpmailer/README.md
Normal file
134
phpmailer/README.md
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
# PHPMailer - A full-featured email creation and transfer class for PHP
|
||||||
|
|
||||||
|
Build status: [](https://travis-ci.org/Synchro/PHPMailer)
|
||||||
|
|
||||||
|
## Class Features
|
||||||
|
|
||||||
|
- Probably the world's most popular code for sending email from PHP!
|
||||||
|
- Used by many open-source projects: Drupal, SugarCRM, Yii, Joomla! and many more
|
||||||
|
- Integrated SMTP support - send without a local mail server
|
||||||
|
- Send emails with multiple TOs, CCs, BCCs and REPLY-TOs
|
||||||
|
- Multipart/alternative emails for mail clients that do not read HTML email
|
||||||
|
- Support for 8bit, base64, binary, and quoted-printable encoding
|
||||||
|
- SMTP authentication with LOGIN, PLAIN, NTLM and CRAM-MD5 mechanisms
|
||||||
|
- Native language support
|
||||||
|
- Compatible with PHP 5.0 and later
|
||||||
|
- Much more!
|
||||||
|
|
||||||
|
## Why you might need it
|
||||||
|
|
||||||
|
Many PHP developers utilize email in their code. The only PHP function that supports this is the mail() function. However, it does not provide any assistance for making use of popular features such as HTML-based emails and attachments.
|
||||||
|
|
||||||
|
Formatting email correctly is surprisingly difficult. There are myriad overlapping RFCs, requiring tight adherence to horribly complicated formatting and encoding rules - the vast majority of code that you'll find online that uses the mail() function directly is just plain wrong!
|
||||||
|
*Please* don't be tempted to do it yourself - if you don't use PHPMailer, there are many other excellent libraries that you should look at before rolling your own - try SwiftMailer, Zend_Mail, eZcomponents etc.
|
||||||
|
|
||||||
|
The PHP mail() function usually sends via a local mail server, typically fronted by a `sendmail` binary on Linux, BSD and OS X platforms, however, Windows usually doesn't include a local mail server; PHPMailer's integrated SMTP implementation allows email sending on Windows platforms without a local mail server.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
This software is licenced under the [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html). Please read LICENSE for information on the
|
||||||
|
software availability and distribution.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
PHPMailer is available via [Composer/Packagist](https://packagist.org/packages/phpmailer/phpmailer). Alternatively, just copy the contents of the PHPMailer folder into somewhere that's in your PHP `include_path` setting. If you don't speak git or just want a tarball, click the 'zip' button at the top of the page in GitHub.
|
||||||
|
|
||||||
|
|
||||||
|
## A Simple Example
|
||||||
|
|
||||||
|
```php
|
||||||
|
<?php
|
||||||
|
require 'class.phpmailer.php';
|
||||||
|
|
||||||
|
$mail = new PHPMailer;
|
||||||
|
|
||||||
|
$mail->IsSMTP(); // Set mailer to use SMTP
|
||||||
|
$mail->Host = 'smtp1.example.com;smtp2.example.com'; // Specify main and backup server
|
||||||
|
$mail->SMTPAuth = true; // Enable SMTP authentication
|
||||||
|
$mail->Username = 'jswan'; // SMTP username
|
||||||
|
$mail->Password = 'secret'; // SMTP password
|
||||||
|
$mail->SMTPSecure = 'tls'; // Enable encryption, 'ssl' also accepted
|
||||||
|
|
||||||
|
$mail->From = 'from@example.com';
|
||||||
|
$mail->FromName = 'Mailer';
|
||||||
|
$mail->AddAddress('josh@example.net', 'Josh Adams'); // Add a recipient
|
||||||
|
$mail->AddAddress('ellen@example.com'); // Name is optional
|
||||||
|
$mail->AddReplyTo('info@example.com', 'Information');
|
||||||
|
$mail->AddCC('cc@example.com');
|
||||||
|
$mail->AddBCC('bcc@example.com');
|
||||||
|
|
||||||
|
$mail->WordWrap = 50; // Set word wrap to 50 characters
|
||||||
|
$mail->AddAttachment('/var/tmp/file.tar.gz'); // Add attachments
|
||||||
|
$mail->AddAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name
|
||||||
|
$mail->IsHTML(true); // Set email format to HTML
|
||||||
|
|
||||||
|
$mail->Subject = 'Here is the subject';
|
||||||
|
$mail->Body = 'This is the HTML message body <b>in bold!</b>';
|
||||||
|
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
|
||||||
|
|
||||||
|
if(!$mail->Send()) {
|
||||||
|
echo 'Message could not be sent.';
|
||||||
|
echo 'Mailer Error: ' . $mail->ErrorInfo;
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo 'Message has been sent';
|
||||||
|
```
|
||||||
|
|
||||||
|
You'll find plenty more to play with in the `examples` folder.
|
||||||
|
|
||||||
|
That's it. You should now be ready to use PHPMailer!
|
||||||
|
|
||||||
|
## Localization
|
||||||
|
PHPMailer defaults to English, but in the `languages` folder you'll find numerous translations for PHPMailer error messages that you may encounter. Their filenames contain [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the translations, for example `fr` for French. To specify a language, you need to tell PHPMailer which one to use, like this:
|
||||||
|
|
||||||
|
```php
|
||||||
|
// To load the French version
|
||||||
|
$mail->SetLanguage('fr', '/optional/path/to/language/directory/');
|
||||||
|
```
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
You'll find some basic user-level docs in the docs folder, and you can generate complete API-level documentation using the `generatedocs.sh` shell script in the docs folder, though you'll need to install [PHPDocumentor](http://www.phpdoc.org) first.
|
||||||
|
|
||||||
|
## Tests
|
||||||
|
|
||||||
|
You'll find a PHPUnit test script in the `test` folder.
|
||||||
|
|
||||||
|
Build status: [](https://travis-ci.org/PHPMailer/PHPMailer)
|
||||||
|
|
||||||
|
If this isn't passing, is there something you can do to help?
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
Please submit bug reports, suggestions and pull requests to the [GitHub issue tracker](https://github.com/PHPMailer/PHPMailer/issues).
|
||||||
|
|
||||||
|
We're particularly interested in fixing edge-cases, expanding test coverage and updating translations.
|
||||||
|
|
||||||
|
With the move to the PHPMailer GitHub organisation, you'll need to update any remote URLs referencing the old GitHub location with a command like this from within your clone:
|
||||||
|
|
||||||
|
git remote set-url upstream https://github.com/PHPMailer/PHPMailer.git
|
||||||
|
|
||||||
|
Please *don't* use the SourceForge or Google Code projects any more.
|
||||||
|
|
||||||
|
## Changelog
|
||||||
|
|
||||||
|
See changelog.md
|
||||||
|
|
||||||
|
## History
|
||||||
|
- PHPMailer was originally written in 2001 by Brent R. Matzelle as a [SourceForge project](http://sourceforge.net/projects/phpmailer/).
|
||||||
|
- Marcus Bointon (coolbru on SF) and Andy Prevost (codeworxtech) took over the project in 2004.
|
||||||
|
- Became an Apache incubator project on Google Code in 2010, managed by Jim Jagielski.
|
||||||
|
- Marcus created his fork on [GitHub](https://github.com/Synchro/PHPMailer).
|
||||||
|
- Jim and Marcus decide to join forces and use GitHub as the canonical and official repo for PHPMailer.
|
||||||
|
- PHPMailer moves to the [PHPMailer organisation](https://github.com/PHPMailer) on GitHub.
|
||||||
|
|
||||||
|
### What's changed since moving from SourceForge?
|
||||||
|
- Official successor to the SourceForge and Google Code projects.
|
||||||
|
- Test suite.
|
||||||
|
- Continuous integration with Travis-CI.
|
||||||
|
- Composer support.
|
||||||
|
- Rolling releases.
|
||||||
|
- Additional languages and language strings.
|
||||||
|
- CRAM-MD5 authentication support.
|
||||||
|
- Preserves full repo history of authors, commits and branches from the original SourceForge project.
|
||||||
501
phpmailer/changelog.md
Normal file
501
phpmailer/changelog.md
Normal file
@@ -0,0 +1,501 @@
|
|||||||
|
# ChangeLog
|
||||||
|
|
||||||
|
## Version 5.2.6 (April 11th 2013)
|
||||||
|
* Reflect move to PHPMailer GitHub organisation at https://github.com/PHPMailer/PHPMailer
|
||||||
|
* Fix unbumped version numbers
|
||||||
|
* Update packagist.org with new location
|
||||||
|
* Clean up Changelog
|
||||||
|
|
||||||
|
## Version 5.2.5 (April 6th 2013)
|
||||||
|
* First official release after move from Google Code
|
||||||
|
* Fixes for qmail when sending via mail()
|
||||||
|
* Merge in changes from Google code 5.2.4 release
|
||||||
|
* Minor coding standards cleanup in SMTP class
|
||||||
|
* Improved unit tests, now tests S/MIME signing
|
||||||
|
* Travis-CI support on GitHub, runs tests with fake SMTP server
|
||||||
|
|
||||||
|
## Version 5.2.4 (February 19, 2013)
|
||||||
|
* Fix tag and version bug.
|
||||||
|
* un-deprecate isSMTP(), isMail(), IsSendmail() and
|
||||||
|
isQmail().
|
||||||
|
* Numerous translation updates
|
||||||
|
|
||||||
|
## Version 5.2.3 (February 8, 2013)
|
||||||
|
* Fix issue with older PCREs and ValidateAddress() (Bugz: 124)
|
||||||
|
* Add CRAM-MD5 authentication, thanks to Elijah madden, https://github.com/okonomiyaki3000
|
||||||
|
* Replacement of obsolete Quoted-Printable encoder with a much better implementation
|
||||||
|
* Composer package definition
|
||||||
|
* New language added: Hebrew
|
||||||
|
|
||||||
|
## Version 5.2.2 (December 3, 2012)
|
||||||
|
* Some fixes and syncs from https://github.com/Synchro/PHPMailer
|
||||||
|
* Add Slovak translation, thanks to Michal Tinka
|
||||||
|
|
||||||
|
## Version 5.2.2-rc2 (November 6, 2012)
|
||||||
|
* Fix SMTP server rotation (Bugz: 118)
|
||||||
|
* Allow override of autogen'ed 'Date' header (for Drupal's
|
||||||
|
og_mailinglist module)
|
||||||
|
* No whitespace after '-f' option (Bugz: 116)
|
||||||
|
* Work around potential warning (Bugz: 114)
|
||||||
|
|
||||||
|
## Version 5.2.2-rc1 (September 28, 2012)
|
||||||
|
* Header encoding works with long lines (Bugz: 93)
|
||||||
|
* Turkish language update (Bugz: 94)
|
||||||
|
* undefined $pattern in EncodeQ bug squashed (Bugz: 98)
|
||||||
|
* use of mail() in safe_mode now works (Bugz: 96)
|
||||||
|
* ValidateAddress() now 'public static' so people can override the
|
||||||
|
default and use their own validation scheme.
|
||||||
|
* ValidateAddress() no longer uses broken FILTER_VALIDATE_EMAIL
|
||||||
|
* Added in AUTH PLAIN SMTP authentication
|
||||||
|
|
||||||
|
## Version 5.2.2-beta2 (August 17, 2012)
|
||||||
|
* Fixed Postfix VERP support (Bugz: 92)
|
||||||
|
* Allow action_function callbacks to pass/use
|
||||||
|
the From address (passed as final param)
|
||||||
|
* Prevent inf look for get_lines() (Bugz: 77)
|
||||||
|
* New public var ($UseSendmailOptions). Only pass sendmail()
|
||||||
|
options iff we really are using sendmail or something sendmail
|
||||||
|
compatible. (Bugz: 75)
|
||||||
|
* default setting for LE returned to "\n" due to popular demand.
|
||||||
|
|
||||||
|
## Version 5.2.2-beta1 (July 13, 2012)
|
||||||
|
* Expose PreSend() and PostSend() as public methods to allow
|
||||||
|
for more control if serializing message sending.
|
||||||
|
* GetSentMIMEMessage() only constructs the message copy when
|
||||||
|
needed. Save memory.
|
||||||
|
* Only pass params to mail() if the underlying MTA is
|
||||||
|
"sendmail" (as defined as "having the string sendmail
|
||||||
|
in its pathname") [#69]
|
||||||
|
* Attachments now work with Amazon SES and others [Bugz#70]
|
||||||
|
* Debug output now sent to stdout (via echo) or error_log [Bugz#5]
|
||||||
|
* New var: Debugoutput (for above) [Bugz#5]
|
||||||
|
* SMTP reads now Timeout aware (new var: Timeout=15) [Bugz#71]
|
||||||
|
* SMTP reads now can have a Timelimit associated with them
|
||||||
|
(new var: Timelimit=30)[Bugz#71]
|
||||||
|
* Fix quoting issue associated with charsets
|
||||||
|
* default setting for LE is now RFC compliant: "\r\n"
|
||||||
|
* Return-Path can now be user defined (new var: ReturnPath)
|
||||||
|
(the default is "" which implies no change from previous
|
||||||
|
behavior, which was to use either From or Sender) [Bugz#46]
|
||||||
|
* X-Mailer header can now be disabled (by setting to a
|
||||||
|
whitespace string, eg " ") [Bugz#66]
|
||||||
|
* Bugz closed: #68, #60, #42, #43, #59, #55, #66, #48, #49,
|
||||||
|
#52, #31, #41, #5. #70, #69
|
||||||
|
|
||||||
|
## Version 5.2.1 (January 16, 2012)
|
||||||
|
* Closed several bugs#5
|
||||||
|
* Performance improvements
|
||||||
|
* MsgHTML() now returns the message as required.
|
||||||
|
* New method: GetSentMIMEMessage() (returns full copy of sent message)
|
||||||
|
|
||||||
|
## Version 5.2 (July 19, 2011)
|
||||||
|
* protected MIME body and header
|
||||||
|
* better DKIM DNS Resource Record support
|
||||||
|
* better aly handling
|
||||||
|
* htmlfilter class added to extras
|
||||||
|
* moved to Apache Extras
|
||||||
|
|
||||||
|
## Version 5.1 (October 20, 2009)
|
||||||
|
* fixed filename issue with AddStringAttachment (thanks to Tony)
|
||||||
|
* fixed "SingleTo" property, now works with Senmail, Qmail, and SMTP in
|
||||||
|
addition to PHP mail()
|
||||||
|
* added DKIM digital signing functionality, new properties:
|
||||||
|
- DKIM_domain (sets the domain name)
|
||||||
|
- DKIM_private (holds DKIM private key)
|
||||||
|
- DKIM_passphrase (holds your DKIM passphrase)
|
||||||
|
- DKIM_selector (holds the DKIM "selector")
|
||||||
|
- DKIM_identity (holds the identifying email address)
|
||||||
|
* added callback function support
|
||||||
|
- callback function parameters include:
|
||||||
|
result, to, cc, bcc, subject and body
|
||||||
|
- see the test/test_callback.php file for usage.
|
||||||
|
* added "auto" identity functionality
|
||||||
|
- can automatically add:
|
||||||
|
- Return-path (if Sender not set)
|
||||||
|
- Reply-To (if ReplyTo not set)
|
||||||
|
- can be disabled:
|
||||||
|
- $mail->SetFrom('yourname@yourdomain.com','First Last',false);
|
||||||
|
- or by adding the $mail->Sender and/or $mail->ReplyTo properties
|
||||||
|
|
||||||
|
Note: "auto" identity added to help with emails ending up in spam or junk boxes because of missing headers
|
||||||
|
|
||||||
|
## Version 5.0.2 (May 24, 2009)
|
||||||
|
* Fix for missing attachments when inline graphics are present
|
||||||
|
* Fix for missing Cc in header when using SMTP (mail was sent,
|
||||||
|
but not displayed in header -- Cc receiver only saw email To:
|
||||||
|
line and no Cc line, but did get the email (To receiver
|
||||||
|
saw same)
|
||||||
|
|
||||||
|
## Version 5.0.1 (April 05, 2009)
|
||||||
|
* Temporary fix for missing attachments
|
||||||
|
|
||||||
|
## Version 5.0.0 (April 02, 2009)
|
||||||
|
With the release of this version, we are initiating a new version numbering
|
||||||
|
system to differentiate from the PHP4 version of PHPMailer.
|
||||||
|
Most notable in this release is fully object oriented code.
|
||||||
|
|
||||||
|
### class.smtp.php:
|
||||||
|
* Refactored class.smtp.php to support new exception handling
|
||||||
|
* code size reduced from 29.2 Kb to 25.6 Kb
|
||||||
|
* Removed unnecessary functions from class.smtp.php:
|
||||||
|
- public function Expand($name) {
|
||||||
|
- public function Help($keyword="") {
|
||||||
|
- public function Noop() {
|
||||||
|
- public function Send($from) {
|
||||||
|
- public function SendOrMail($from) {
|
||||||
|
- public function Verify($name) {
|
||||||
|
|
||||||
|
### class.phpmailer.php:
|
||||||
|
* Refactored class.phpmailer.php with new exception handling
|
||||||
|
* Changed processing functionality of Sendmail and Qmail so they cannot be
|
||||||
|
inadvertently used
|
||||||
|
* removed getFile() function, just became a simple wrapper for
|
||||||
|
file_get_contents()
|
||||||
|
* added check for PHP version (will gracefully exit if not at least PHP 5.0)
|
||||||
|
* enhanced code to check if an attachment source is the same as an embedded or
|
||||||
|
inline graphic source to eliminate duplicate attachments
|
||||||
|
|
||||||
|
### New /test_script
|
||||||
|
We have written a test script you can use to test the script as part of your
|
||||||
|
installation. Once you press submit, the test script will send a multi-mime
|
||||||
|
email with either the message you type in or an HTML email with an inline
|
||||||
|
graphic. Two attachments are included in the email (one of the attachments
|
||||||
|
is also the inline graphic so you can see that only one copy of the graphic
|
||||||
|
is sent in the email). The test script will also display the functional
|
||||||
|
script that you can copy/paste to your editor to duplicate the functionality.
|
||||||
|
|
||||||
|
### New examples
|
||||||
|
All new examples in both basic and advanced modes. Advanced examples show
|
||||||
|
Exception handling.
|
||||||
|
|
||||||
|
### PHPDocumentator (phpdocs) documentation for PHPMailer version 5.0.0
|
||||||
|
All new documentation
|
||||||
|
|
||||||
|
## Version 2.3 (November 06, 2008)
|
||||||
|
* added Arabic language (many thanks to Bahjat Al Mostafa)
|
||||||
|
* removed English language from language files and made it a default within
|
||||||
|
class.phpmailer.php - if no language is found, it will default to use
|
||||||
|
the english language translation
|
||||||
|
* fixed public/private declarations
|
||||||
|
* corrected line 1728, $basedir to $directory
|
||||||
|
* added $sign_cert_file to avoid improper duplicate use of $sign_key_file
|
||||||
|
* corrected $this->Hello on line 612 to $this->Helo
|
||||||
|
* changed default of $LE to "\r\n" to comply with RFC 2822. Can be set by the user
|
||||||
|
if default is not acceptable
|
||||||
|
* removed trim() from return results in EncodeQP
|
||||||
|
* /test and three files it contained are removed from version 2.3
|
||||||
|
* fixed phpunit.php for compliance with PHP5
|
||||||
|
* changed $this->AltBody = $textMsg; to $this->AltBody = html_entity_decode($textMsg);
|
||||||
|
* We have removed the /phpdoc from the downloads. All documentation is now on
|
||||||
|
the http://phpmailer.codeworxtech.com website.
|
||||||
|
|
||||||
|
## Version 2.2.1 () July 19 2008
|
||||||
|
* fixed line 1092 in class.smtp.php (my apologies, error on my part)
|
||||||
|
|
||||||
|
## Version 2.2 () July 15 2008
|
||||||
|
* Fixed redirect issue (display of UTF-8 in thank you redirect)
|
||||||
|
* fixed error in getResponse function declaration (class.pop3.php)
|
||||||
|
* PHPMailer now PHP6 compliant
|
||||||
|
* fixed line 1092 in class.smtp.php (endless loop from missing = sign)
|
||||||
|
|
||||||
|
## Version 2.1 (Wed, June 04 2008)
|
||||||
|
NOTE: WE HAVE A NEW LANGUAGE VARIABLE FOR DIGITALLY SIGNED S/MIME EMAILS. IF YOU CAN HELP WITH LANGUAGES OTHER THAN ENGLISH AND SPANISH, IT WOULD BE APPRECIATED.
|
||||||
|
|
||||||
|
* added S/MIME functionality (ability to digitally sign emails)
|
||||||
|
BIG THANKS TO "sergiocambra" for posting this patch back in November 2007.
|
||||||
|
The "Signed Emails" functionality adds the Sign method to pass the private key
|
||||||
|
filename and the password to read it, and then email will be sent with
|
||||||
|
content-type multipart/signed and with the digital signature attached.
|
||||||
|
* fully compatible with E_STRICT error level
|
||||||
|
- Please note:
|
||||||
|
In about half the test environments this development version was subjected
|
||||||
|
to, an error was thrown for the date() functions used (line 1565 and 1569).
|
||||||
|
This is NOT a PHPMailer error, it is the result of an incorrectly configured
|
||||||
|
PHP5 installation. The fix is to modify your 'php.ini' file and include the
|
||||||
|
date.timezone = America/New York
|
||||||
|
directive, to your own server timezone
|
||||||
|
- If you do get this error, and are unable to access your php.ini file:
|
||||||
|
In your PHP script, add
|
||||||
|
`date_default_timezone_set('America/Toronto');`
|
||||||
|
- do not try to use
|
||||||
|
`$myVar = date_default_timezone_get();`
|
||||||
|
as a test, it will throw an error.
|
||||||
|
* added ability to define path (mainly for embedded images)
|
||||||
|
function `MsgHTML($message,$basedir='')` ... where:
|
||||||
|
`$basedir` is the fully qualified path
|
||||||
|
* fixed `MsgHTML()` function:
|
||||||
|
- Embedded Images where images are specified by `<protocol>://` will not be altered or embedded
|
||||||
|
* fixed the return value of SMTP exit code ( pclose )
|
||||||
|
* addressed issue of multibyte characters in subject line and truncating
|
||||||
|
* added ability to have user specified Message ID
|
||||||
|
(default is still that PHPMailer create a unique Message ID)
|
||||||
|
* corrected unidentified message type to 'application/octet-stream'
|
||||||
|
* fixed chunk_split() multibyte issue (thanks to Colin Brown, et al).
|
||||||
|
* added check for added attachments
|
||||||
|
* enhanced conversion of HTML to text in MsgHTML (thanks to "brunny")
|
||||||
|
|
||||||
|
## Version 2.1.0beta2 (Sun, Dec 02 2007)
|
||||||
|
* implemented updated EncodeQP (thanks to coolbru, aka Marcus Bointon)
|
||||||
|
* finished all testing, all known bugs corrected, enhancements tested
|
||||||
|
|
||||||
|
Note: will NOT work with PHP4.
|
||||||
|
|
||||||
|
Please note, this is BETA software **DO NOT USE THIS IN PRODUCTION OR LIVE PROJECTS; INTENDED STRICTLY FOR TESTING**
|
||||||
|
|
||||||
|
## Version 2.1.0beta1
|
||||||
|
Please note, this is BETA software
|
||||||
|
** DO NOT USE THIS IN PRODUCTION OR LIVE PROJECTS
|
||||||
|
INTENDED STRICTLY FOR TESTING
|
||||||
|
|
||||||
|
## Version 2.0.0 rc2 (Fri, Nov 16 2007), interim release
|
||||||
|
* implements new property to control VERP in class.smtp.php
|
||||||
|
example (requires instantiating class.smtp.php):
|
||||||
|
$mail->do_verp = true;
|
||||||
|
* POP-before-SMTP functionality included, thanks to Richard Davey
|
||||||
|
(see class.pop3.php & pop3_before_smtp_test.php for examples)
|
||||||
|
* included example showing how to use PHPMailer with GMAIL
|
||||||
|
* fixed the missing Cc in SendMail() and Mail()
|
||||||
|
|
||||||
|
******************
|
||||||
|
A note on sending bulk emails:
|
||||||
|
|
||||||
|
If the email you are sending is not personalized, consider using the
|
||||||
|
"undisclosed-recipient:;" strategy. That is, put all of your recipients
|
||||||
|
in the Bcc field and set the To field to "undisclosed-recipients:;".
|
||||||
|
It's a lot faster (only one send) and saves quite a bit on resources.
|
||||||
|
Contrary to some opinions, this will not get you listed in spam engines -
|
||||||
|
it's a legitimate way for you to send emails.
|
||||||
|
|
||||||
|
A partial example for use with PHPMailer:
|
||||||
|
|
||||||
|
```
|
||||||
|
$mail->AddAddress("undisclosed-recipients:;");
|
||||||
|
$mail->AddBCC("email1@anydomain.com,email2@anyotherdomain.com,email3@anyalternatedomain.com");
|
||||||
|
```
|
||||||
|
|
||||||
|
Many email service providers restrict the number of emails that can be sent
|
||||||
|
in any given time period. Often that is between 50 - 60 emails maximum
|
||||||
|
per hour or per send session.
|
||||||
|
|
||||||
|
If that's the case, then break up your Bcc lists into chunks that are one
|
||||||
|
less than your limit, and put a pause in your script.
|
||||||
|
*******************
|
||||||
|
|
||||||
|
## Version 2.0.0 rc1 (Thu, Nov 08 2007), interim release
|
||||||
|
* dramatically simplified using inline graphics ... it's fully automated and requires no user input
|
||||||
|
* added automatic document type detection for attachments and pictures
|
||||||
|
* added MsgHTML() function to replace Body tag for HTML emails
|
||||||
|
* fixed the SendMail security issues (input validation vulnerability)
|
||||||
|
* enhanced the AddAddresses functionality so that the "Name" portion is used in the email address
|
||||||
|
* removed the need to use the AltBody method (set from the HTML, or default text used)
|
||||||
|
* set the PHP Mail() function as the default (still support SendMail, SMTP Mail)
|
||||||
|
* removed the need to set the IsHTML property (set automatically)
|
||||||
|
* added Estonian language file by Indrek Päri
|
||||||
|
* added header injection patch
|
||||||
|
* added "set" method to permit users to create their own pseudo-properties like 'X-Headers', etc.
|
||||||
|
example of use:
|
||||||
|
|
||||||
|
```
|
||||||
|
$mail->set('X-Priority', '3');
|
||||||
|
$mail->set('X-MSMail-Priority', 'Normal');
|
||||||
|
```
|
||||||
|
|
||||||
|
* fixed warning message in SMTP get_lines method
|
||||||
|
* added TLS/SSL SMTP support. Example of use:
|
||||||
|
|
||||||
|
```
|
||||||
|
$mail = new PHPMailer();
|
||||||
|
$mail->Mailer = "smtp";
|
||||||
|
$mail->Host = "smtp.example.com";
|
||||||
|
$mail->SMTPSecure = "tls"; // option
|
||||||
|
//$mail->SMTPSecure = "ssl"; // option
|
||||||
|
...
|
||||||
|
$mail->Send();
|
||||||
|
```
|
||||||
|
|
||||||
|
* PHPMailer has been tested with PHP4 (4.4.7) and PHP5 (5.2.7)
|
||||||
|
* Works with PHP installed as a module or as CGI-PHP
|
||||||
|
NOTE: will NOT work with PHP5 in E_STRICT error mode
|
||||||
|
|
||||||
|
## Version 1.73 (Sun, Jun 10 2005)
|
||||||
|
* Fixed denial of service bug: http://www.cybsec.com/vuln/PHPMailer-DOS.pdf
|
||||||
|
* Now has a total of 20 translations
|
||||||
|
* Fixed alt attachments bug: http://tinyurl.com/98u9k
|
||||||
|
|
||||||
|
## Version 1.72 (Wed, May 25 2004)
|
||||||
|
* Added Dutch, Swedish, Czech, Norwegian, and Turkish translations.
|
||||||
|
* Received: Removed this method because spam filter programs like
|
||||||
|
SpamAssassin reject this header.
|
||||||
|
* Fixed error count bug.
|
||||||
|
* SetLanguage default is now "language/".
|
||||||
|
* Fixed magic_quotes_runtime bug.
|
||||||
|
|
||||||
|
## Version 1.71 (Tue, Jul 28 2003)
|
||||||
|
* Made several speed enhancements
|
||||||
|
* Added German and Italian translation files
|
||||||
|
* Fixed HELO/AUTH bugs on keep-alive connects
|
||||||
|
* Now provides an error message if language file does not load
|
||||||
|
* Fixed attachment EOL bug
|
||||||
|
* Updated some unclear documentation
|
||||||
|
* Added additional tests and improved others
|
||||||
|
|
||||||
|
## Version 1.70 (Mon, Jun 20 2003)
|
||||||
|
* Added SMTP keep-alive support
|
||||||
|
* Added IsError method for error detection
|
||||||
|
* Added error message translation support (SetLanguage)
|
||||||
|
* Refactored many methods to increase library performance
|
||||||
|
* Hello now sends the newer EHLO message before HELO as per RFC 2821
|
||||||
|
* Removed the boundary class and replaced it with GetBoundary
|
||||||
|
* Removed queue support methods
|
||||||
|
* New $Hostname variable
|
||||||
|
* New Message-ID header
|
||||||
|
* Received header reformat
|
||||||
|
* Helo variable default changed to $Hostname
|
||||||
|
* Removed extra spaces in Content-Type definition (#667182)
|
||||||
|
* Return-Path should be set to Sender when set
|
||||||
|
* Adds Q or B encoding to headers when necessary
|
||||||
|
* quoted-encoding should now encode NULs \000
|
||||||
|
* Fixed encoding of body/AltBody (#553370)
|
||||||
|
* Adds "To: undisclosed-recipients:;" when all recipients are hidden (BCC)
|
||||||
|
* Multiple bug fixes
|
||||||
|
|
||||||
|
## Version 1.65 (Fri, Aug 09 2002)
|
||||||
|
* Fixed non-visible attachment bug (#585097) for Outlook
|
||||||
|
* SMTP connections are now closed after each transaction
|
||||||
|
* Fixed SMTP::Expand return value
|
||||||
|
* Converted SMTP class documentation to phpDocumentor format
|
||||||
|
|
||||||
|
## Version 1.62 (Wed, Jun 26 2002)
|
||||||
|
* Fixed multi-attach bug
|
||||||
|
* Set proper word wrapping
|
||||||
|
* Reduced memory use with attachments
|
||||||
|
* Added more debugging
|
||||||
|
* Changed documentation to phpDocumentor format
|
||||||
|
|
||||||
|
## Version 1.60 (Sat, Mar 30 2002)
|
||||||
|
* Sendmail pipe and address patch (Christian Holtje)
|
||||||
|
* Added embedded image and read confirmation support (A. Ognio)
|
||||||
|
* Added unit tests
|
||||||
|
* Added SMTP timeout support (*nix only)
|
||||||
|
* Added possibly temporary PluginDir variable for SMTP class
|
||||||
|
* Added LE message line ending variable
|
||||||
|
* Refactored boundary and attachment code
|
||||||
|
* Eliminated SMTP class warnings
|
||||||
|
* Added SendToQueue method for future queuing support
|
||||||
|
|
||||||
|
## Version 1.54 (Wed, Dec 19 2001)
|
||||||
|
* Add some queuing support code
|
||||||
|
* Fixed a pesky multi/alt bug
|
||||||
|
* Messages are no longer forced to have "To" addresses
|
||||||
|
|
||||||
|
## Version 1.50 (Thu, Nov 08 2001)
|
||||||
|
* Fix extra lines when not using SMTP mailer
|
||||||
|
* Set WordWrap variable to int with a zero default
|
||||||
|
|
||||||
|
## Version 1.47 (Tue, Oct 16 2001)
|
||||||
|
* Fixed Received header code format
|
||||||
|
* Fixed AltBody order error
|
||||||
|
* Fixed alternate port warning
|
||||||
|
|
||||||
|
## Version 1.45 (Tue, Sep 25 2001)
|
||||||
|
* Added enhanced SMTP debug support
|
||||||
|
* Added support for multiple ports on SMTP
|
||||||
|
* Added Received header for tracing
|
||||||
|
* Fixed AddStringAttachment encoding
|
||||||
|
* Fixed possible header name quote bug
|
||||||
|
* Fixed wordwrap() trim bug
|
||||||
|
* Couple other small bug fixes
|
||||||
|
|
||||||
|
## Version 1.41 (Wed, Aug 22 2001)
|
||||||
|
* Fixed AltBody bug w/o attachments
|
||||||
|
* Fixed rfc_date() for certain mail servers
|
||||||
|
|
||||||
|
## Version 1.40 (Sun, Aug 12 2001)
|
||||||
|
* Added multipart/alternative support (AltBody)
|
||||||
|
* Documentation update
|
||||||
|
* Fixed bug in Mercury MTA
|
||||||
|
|
||||||
|
## Version 1.29 (Fri, Aug 03 2001)
|
||||||
|
* Added AddStringAttachment() method
|
||||||
|
* Added SMTP authentication support
|
||||||
|
|
||||||
|
## Version 1.28 (Mon, Jul 30 2001)
|
||||||
|
* Fixed a typo in SMTP class
|
||||||
|
* Fixed header issue with Imail (win32) SMTP server
|
||||||
|
* Made fopen() calls for attachments use "rb" to fix win32 error
|
||||||
|
|
||||||
|
## Version 1.25 (Mon, Jul 02 2001)
|
||||||
|
* Added RFC 822 date fix (Patrice)
|
||||||
|
* Added improved error handling by adding a $ErrorInfo variable
|
||||||
|
* Removed MailerDebug variable (obsolete with new error handler)
|
||||||
|
|
||||||
|
## Version 1.20 (Mon, Jun 25 2001)
|
||||||
|
* Added quoted-printable encoding (Patrice)
|
||||||
|
* Set Version as public and removed PrintVersion()
|
||||||
|
* Changed phpdoc to only display public variables and methods
|
||||||
|
|
||||||
|
## Version 1.19 (Thu, Jun 21 2001)
|
||||||
|
* Fixed MS Mail header bug
|
||||||
|
* Added fix for Bcc problem with mail(). *Does not work on Win32*
|
||||||
|
(See PHP bug report: http://www.php.net/bugs.php?id=11616)
|
||||||
|
* mail() no longer passes a fifth parameter when not needed
|
||||||
|
|
||||||
|
## Version 1.15 (Fri, Jun 15 2001)
|
||||||
|
Note: these changes contributed by Patrice Fournier
|
||||||
|
* Changed all remaining \n to \r\n
|
||||||
|
* Bcc: header no longer writen to message except
|
||||||
|
when sent directly to sendmail
|
||||||
|
* Added a small message to non-MIME compliant mail reader
|
||||||
|
* Added Sender variable to change the Sender email
|
||||||
|
used in -f for sendmail/mail and in 'MAIL FROM' for smtp mode
|
||||||
|
* Changed boundary setting to a place it will be set only once
|
||||||
|
* Removed transfer encoding for whole message when using multipart
|
||||||
|
* Message body now uses Encoding in multipart messages
|
||||||
|
* Can set encoding and type to attachments 7bit, 8bit
|
||||||
|
and binary attachment are sent as is, base64 are encoded
|
||||||
|
* Can set Encoding to base64 to send 8 bits body
|
||||||
|
through 7 bits servers
|
||||||
|
|
||||||
|
## Version 1.10 (Tue, Jun 12 2001)
|
||||||
|
* Fixed win32 mail header bug (printed out headers in message body)
|
||||||
|
|
||||||
|
## Version 1.09 (Fri, Jun 08 2001)
|
||||||
|
* Changed date header to work with Netscape mail programs
|
||||||
|
* Altered phpdoc documentation
|
||||||
|
|
||||||
|
## Version 1.08 (Tue, Jun 05 2001)
|
||||||
|
* Added enhanced error-checking
|
||||||
|
* Added phpdoc documentation to source
|
||||||
|
|
||||||
|
## Version 1.06 (Fri, Jun 01 2001)
|
||||||
|
* Added optional name for file attachments
|
||||||
|
|
||||||
|
## Version 1.05 (Tue, May 29 2001)
|
||||||
|
* Code cleanup
|
||||||
|
* Eliminated sendmail header warning message
|
||||||
|
* Fixed possible SMTP error
|
||||||
|
|
||||||
|
## Version 1.03 (Thu, May 24 2001)
|
||||||
|
* Fixed problem where qmail sends out duplicate messages
|
||||||
|
|
||||||
|
## Version 1.02 (Wed, May 23 2001)
|
||||||
|
* Added multiple recipient and attachment Clear* methods
|
||||||
|
* Added Sendmail public variable
|
||||||
|
* Fixed problem with loading SMTP library multiple times
|
||||||
|
|
||||||
|
## Version 0.98 (Tue, May 22 2001)
|
||||||
|
* Fixed problem with redundant mail hosts sending out multiple messages
|
||||||
|
* Added additional error handler code
|
||||||
|
* Added AddCustomHeader() function
|
||||||
|
* Added support for Microsoft mail client headers (affects priority)
|
||||||
|
* Fixed small bug with Mailer variable
|
||||||
|
* Added PrintVersion() function
|
||||||
|
|
||||||
|
## Version 0.92 (Tue, May 15 2001)
|
||||||
|
* Changed file names to class.phpmailer.php and class.smtp.php to match
|
||||||
|
current PHP class trend.
|
||||||
|
* Fixed problem where body not being printed when a message is attached
|
||||||
|
* Several small bug fixes
|
||||||
|
|
||||||
|
## Version 0.90 (Tue, April 17 2001)
|
||||||
|
* Initial public release
|
||||||
2810
phpmailer/class.phpmailer.php
Normal file
2810
phpmailer/class.phpmailer.php
Normal file
File diff suppressed because it is too large
Load Diff
418
phpmailer/class.pop3.php
Normal file
418
phpmailer/class.pop3.php
Normal file
@@ -0,0 +1,418 @@
|
|||||||
|
<?php
|
||||||
|
/*~ class.pop3.php
|
||||||
|
.---------------------------------------------------------------------------.
|
||||||
|
| Software: PHPMailer - PHP email class |
|
||||||
|
| Version: 5.2.6 |
|
||||||
|
| Site: https://github.com/PHPMailer/PHPMailer/ |
|
||||||
|
| ------------------------------------------------------------------------- |
|
||||||
|
| Admins: Marcus Bointon |
|
||||||
|
| Admins: Jim Jagielski |
|
||||||
|
| Authors: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net |
|
||||||
|
| : Marcus Bointon (coolbru) coolbru@users.sourceforge.net |
|
||||||
|
| : Jim Jagielski (jimjag) jimjag@gmail.com |
|
||||||
|
| Founder: Brent R. Matzelle (original founder) |
|
||||||
|
| Copyright (c) 2010-2012, Jim Jagielski. All Rights Reserved. |
|
||||||
|
| Copyright (c) 2004-2009, Andy Prevost. All Rights Reserved. |
|
||||||
|
| Copyright (c) 2001-2003, Brent R. Matzelle |
|
||||||
|
| ------------------------------------------------------------------------- |
|
||||||
|
| License: Distributed under the Lesser General Public License (LGPL) |
|
||||||
|
| http://www.gnu.org/copyleft/lesser.html |
|
||||||
|
| This program is distributed in the hope that it will be useful - WITHOUT |
|
||||||
|
| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
||||||
|
| FITNESS FOR A PARTICULAR PURPOSE. |
|
||||||
|
'---------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PHPMailer - PHP POP Before SMTP Authentication Class
|
||||||
|
* NOTE: Designed for use with PHP version 5 and up
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Andy Prevost
|
||||||
|
* @author Marcus Bointon
|
||||||
|
* @author Jim Jagielski
|
||||||
|
* @copyright 2010 - 2012 Jim Jagielski
|
||||||
|
* @copyright 2004 - 2009 Andy Prevost
|
||||||
|
* @license http://www.gnu.org/copyleft/lesser.html Distributed under the Lesser General Public License (LGPL)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PHP POP-Before-SMTP Authentication Class
|
||||||
|
*
|
||||||
|
* Version 5.2.6
|
||||||
|
*
|
||||||
|
* @license: LGPL, see PHPMailer License
|
||||||
|
*
|
||||||
|
* Specifically for PHPMailer to allow POP before SMTP authentication.
|
||||||
|
* Does not yet work with APOP - if you have an APOP account, contact Jim Jagielski
|
||||||
|
* and we can test changes to this script.
|
||||||
|
*
|
||||||
|
* This class is based on the structure of the SMTP class originally authored by Chris Ryan
|
||||||
|
*
|
||||||
|
* This class is rfc 1939 compliant and implements all the commands
|
||||||
|
* required for POP3 connection, authentication and disconnection.
|
||||||
|
*
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Richard Davey (orig) <rich@corephp.co.uk>
|
||||||
|
* @author Andy Prevost
|
||||||
|
* @author Jim Jagielski
|
||||||
|
*/
|
||||||
|
|
||||||
|
class POP3 {
|
||||||
|
/**
|
||||||
|
* Default POP3 port
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
public $POP3_PORT = 110;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default Timeout
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
public $POP3_TIMEOUT = 30;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POP3 Carriage Return + Line Feed
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $CRLF = "\r\n";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Displaying Debug warnings? (0 = now, 1+ = yes)
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
public $do_debug = 2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POP3 Mail Server
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $host;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POP3 Port
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
public $port;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POP3 Timeout Value
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
public $tval;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POP3 Username
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $username;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POP3 Password
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $password;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the POP3 PHPMailer Version number
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $Version = '5.2.6';
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////
|
||||||
|
// PROPERTIES, PRIVATE AND PROTECTED
|
||||||
|
/////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var resource Resource handle for the POP connection socket
|
||||||
|
*/
|
||||||
|
private $pop_conn;
|
||||||
|
/**
|
||||||
|
* @var boolean Are we connected?
|
||||||
|
*/
|
||||||
|
private $connected;
|
||||||
|
/**
|
||||||
|
* @var array Error container
|
||||||
|
*/
|
||||||
|
private $error; // Error log array
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor, sets the initial values
|
||||||
|
* @access public
|
||||||
|
* @return POP3
|
||||||
|
*/
|
||||||
|
public function __construct() {
|
||||||
|
$this->pop_conn = 0;
|
||||||
|
$this->connected = false;
|
||||||
|
$this->error = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Combination of public events - connect, login, disconnect
|
||||||
|
* @access public
|
||||||
|
* @param string $host
|
||||||
|
* @param bool|int $port
|
||||||
|
* @param bool|int $tval
|
||||||
|
* @param string $username
|
||||||
|
* @param string $password
|
||||||
|
* @param int $debug_level
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function Authorise ($host, $port = false, $tval = false, $username, $password, $debug_level = 0) {
|
||||||
|
$this->host = $host;
|
||||||
|
|
||||||
|
// If no port value is passed, retrieve it
|
||||||
|
if ($port == false) {
|
||||||
|
$this->port = $this->POP3_PORT;
|
||||||
|
} else {
|
||||||
|
$this->port = $port;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If no port value is passed, retrieve it
|
||||||
|
if ($tval == false) {
|
||||||
|
$this->tval = $this->POP3_TIMEOUT;
|
||||||
|
} else {
|
||||||
|
$this->tval = $tval;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->do_debug = $debug_level;
|
||||||
|
$this->username = $username;
|
||||||
|
$this->password = $password;
|
||||||
|
|
||||||
|
// Refresh the error log
|
||||||
|
$this->error = null;
|
||||||
|
|
||||||
|
// Connect
|
||||||
|
$result = $this->Connect($this->host, $this->port, $this->tval);
|
||||||
|
|
||||||
|
if ($result) {
|
||||||
|
$login_result = $this->Login($this->username, $this->password);
|
||||||
|
|
||||||
|
if ($login_result) {
|
||||||
|
$this->Disconnect();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// We need to disconnect regardless if the login succeeded
|
||||||
|
$this->Disconnect();
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Connect to the POP3 server
|
||||||
|
* @access public
|
||||||
|
* @param string $host
|
||||||
|
* @param bool|int $port
|
||||||
|
* @param integer $tval
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function Connect ($host, $port = false, $tval = 30) {
|
||||||
|
// Are we already connected?
|
||||||
|
if ($this->connected) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
On Windows this will raise a PHP Warning error if the hostname doesn't exist.
|
||||||
|
Rather than supress it with @fsockopen, let's capture it cleanly instead
|
||||||
|
*/
|
||||||
|
|
||||||
|
set_error_handler(array(&$this, 'catchWarning'));
|
||||||
|
|
||||||
|
// Connect to the POP3 server
|
||||||
|
$this->pop_conn = fsockopen($host, // POP3 Host
|
||||||
|
$port, // Port #
|
||||||
|
$errno, // Error Number
|
||||||
|
$errstr, // Error Message
|
||||||
|
$tval); // Timeout (seconds)
|
||||||
|
|
||||||
|
// Restore the error handler
|
||||||
|
restore_error_handler();
|
||||||
|
|
||||||
|
// Does the Error Log now contain anything?
|
||||||
|
if ($this->error && $this->do_debug >= 1) {
|
||||||
|
$this->displayErrors();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Did we connect?
|
||||||
|
if ($this->pop_conn == false) {
|
||||||
|
// It would appear not...
|
||||||
|
$this->error = array(
|
||||||
|
'error' => "Failed to connect to server $host on port $port",
|
||||||
|
'errno' => $errno,
|
||||||
|
'errstr' => $errstr
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($this->do_debug >= 1) {
|
||||||
|
$this->displayErrors();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Increase the stream time-out
|
||||||
|
|
||||||
|
// Check for PHP 4.3.0 or later
|
||||||
|
if (version_compare(phpversion(), '5.0.0', 'ge')) {
|
||||||
|
stream_set_timeout($this->pop_conn, $tval, 0);
|
||||||
|
} else {
|
||||||
|
// Does not work on Windows
|
||||||
|
if (substr(PHP_OS, 0, 3) !== 'WIN') {
|
||||||
|
socket_set_timeout($this->pop_conn, $tval, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the POP3 server response
|
||||||
|
$pop3_response = $this->getResponse();
|
||||||
|
|
||||||
|
// Check for the +OK
|
||||||
|
if ($this->checkResponse($pop3_response)) {
|
||||||
|
// The connection is established and the POP3 server is talking
|
||||||
|
$this->connected = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Login to the POP3 server (does not support APOP yet)
|
||||||
|
* @access public
|
||||||
|
* @param string $username
|
||||||
|
* @param string $password
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function Login ($username = '', $password = '') {
|
||||||
|
if ($this->connected == false) {
|
||||||
|
$this->error = 'Not connected to POP3 server';
|
||||||
|
|
||||||
|
if ($this->do_debug >= 1) {
|
||||||
|
$this->displayErrors();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($username)) {
|
||||||
|
$username = $this->username;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($password)) {
|
||||||
|
$password = $this->password;
|
||||||
|
}
|
||||||
|
|
||||||
|
$pop_username = "USER $username" . $this->CRLF;
|
||||||
|
$pop_password = "PASS $password" . $this->CRLF;
|
||||||
|
|
||||||
|
// Send the Username
|
||||||
|
$this->sendString($pop_username);
|
||||||
|
$pop3_response = $this->getResponse();
|
||||||
|
|
||||||
|
if ($this->checkResponse($pop3_response)) {
|
||||||
|
// Send the Password
|
||||||
|
$this->sendString($pop_password);
|
||||||
|
$pop3_response = $this->getResponse();
|
||||||
|
|
||||||
|
if ($this->checkResponse($pop3_response)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disconnect from the POP3 server
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
public function Disconnect () {
|
||||||
|
$this->sendString('QUIT');
|
||||||
|
|
||||||
|
fclose($this->pop_conn);
|
||||||
|
}
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////
|
||||||
|
// Private Methods
|
||||||
|
/////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the socket response back.
|
||||||
|
* $size is the maximum number of bytes to retrieve
|
||||||
|
* @access private
|
||||||
|
* @param integer $size
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private function getResponse ($size = 128) {
|
||||||
|
$pop3_response = fgets($this->pop_conn, $size);
|
||||||
|
|
||||||
|
return $pop3_response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send a string down the open socket connection to the POP3 server
|
||||||
|
* @access private
|
||||||
|
* @param string $string
|
||||||
|
* @return integer
|
||||||
|
*/
|
||||||
|
private function sendString ($string) {
|
||||||
|
$bytes_sent = fwrite($this->pop_conn, $string, strlen($string));
|
||||||
|
|
||||||
|
return $bytes_sent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks the POP3 server response for +OK or -ERR
|
||||||
|
* @access private
|
||||||
|
* @param string $string
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
private function checkResponse ($string) {
|
||||||
|
if (substr($string, 0, 3) !== '+OK') {
|
||||||
|
$this->error = array(
|
||||||
|
'error' => "Server reported an error: $string",
|
||||||
|
'errno' => 0,
|
||||||
|
'errstr' => ''
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($this->do_debug >= 1) {
|
||||||
|
$this->displayErrors();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If debug is enabled, display the error message array
|
||||||
|
* @access private
|
||||||
|
*/
|
||||||
|
private function displayErrors () {
|
||||||
|
echo '<pre>';
|
||||||
|
|
||||||
|
foreach ($this->error as $single_error) {
|
||||||
|
print_r($single_error);
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '</pre>';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Takes over from PHP for the socket warning handler
|
||||||
|
* @access private
|
||||||
|
* @param integer $errno
|
||||||
|
* @param string $errstr
|
||||||
|
* @param string $errfile
|
||||||
|
* @param integer $errline
|
||||||
|
*/
|
||||||
|
private function catchWarning ($errno, $errstr, $errfile, $errline) {
|
||||||
|
$this->error[] = array(
|
||||||
|
'error' => "Connecting to the POP3 server raised a PHP warning: ",
|
||||||
|
'errno' => $errno,
|
||||||
|
'errstr' => $errstr
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// End of class
|
||||||
|
}
|
||||||
1088
phpmailer/class.smtp.php
Normal file
1088
phpmailer/class.smtp.php
Normal file
File diff suppressed because it is too large
Load Diff
32
phpmailer/composer.json
Normal file
32
phpmailer/composer.json
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"name": "phpmailer/phpmailer",
|
||||||
|
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Jim Jagielski",
|
||||||
|
"email": "jimjag@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Marcus Bointon",
|
||||||
|
"email": "phpmailer@synchromedia.co.uk"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Andy Prevost",
|
||||||
|
"email": "codeworxtech@users.sourceforge.net"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Brent R. Matzelle"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.0.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpdocumentor/phpdocumentor": "*",
|
||||||
|
"phpunit/phpunit": "*"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"classmap": ["class.phpmailer.php", "class.pop3.php", "class.smtp.php"]
|
||||||
|
},
|
||||||
|
"license": "LGPL-2.1"
|
||||||
|
}
|
||||||
17
phpmailer/docs/Callback_function_notes.txt
Normal file
17
phpmailer/docs/Callback_function_notes.txt
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
NEW CALLBACK FUNCTION:
|
||||||
|
======================
|
||||||
|
|
||||||
|
We have had requests for a method to process the results of sending emails
|
||||||
|
through PHPMailer. In this new release, we have implemented a callback
|
||||||
|
function that passes the results of each email sent (to, cc, and/or bcc).
|
||||||
|
We have provided an example that echos the results back to the screen. The
|
||||||
|
callback function can be used for any purpose. With minor modifications, the
|
||||||
|
callback function can be used to create CSV logs, post results to databases,
|
||||||
|
etc.
|
||||||
|
|
||||||
|
Please review the test.php script for the example.
|
||||||
|
|
||||||
|
It's pretty straight forward.
|
||||||
|
|
||||||
|
Enjoy!
|
||||||
|
Andy
|
||||||
55
phpmailer/docs/DomainKeys_notes.txt
Normal file
55
phpmailer/docs/DomainKeys_notes.txt
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
CREATE DKIM KEYS and DNS Resource Record:
|
||||||
|
=========================================
|
||||||
|
|
||||||
|
To create DomainKeys Identified Mail keys, visit:
|
||||||
|
http://dkim.worxware.com/
|
||||||
|
... read the information, fill in the form, and download the ZIP file
|
||||||
|
containing the public key, private key, DNS Resource Record and instructions
|
||||||
|
to add to your DNS Zone Record, and the PHPMailer code to enable DKIM
|
||||||
|
digital signing.
|
||||||
|
|
||||||
|
/*** PROTECT YOUR PRIVATE & PUBLIC KEYS ***/
|
||||||
|
|
||||||
|
You need to protect your DKIM private and public keys from being viewed or
|
||||||
|
accessed. Add protection to your .htaccess file as in this example:
|
||||||
|
|
||||||
|
# secure htkeyprivate file
|
||||||
|
<Files .htkeyprivate>
|
||||||
|
order allow,deny
|
||||||
|
deny from all
|
||||||
|
</Files>
|
||||||
|
|
||||||
|
# secure htkeypublic file
|
||||||
|
<Files .htkeypublic>
|
||||||
|
order allow,deny
|
||||||
|
deny from all
|
||||||
|
</Files>
|
||||||
|
|
||||||
|
(the actual .htaccess additions are in the ZIP file sent back to you from
|
||||||
|
http://dkim.worxware.com/
|
||||||
|
|
||||||
|
A few notes on using DomainKey Identified Mail (DKIM):
|
||||||
|
|
||||||
|
You do not need to use PHPMailer to DKIM sign emails IF:
|
||||||
|
- you enable DomainKey support and add the DNS resource record
|
||||||
|
- you use your outbound mail server
|
||||||
|
|
||||||
|
If you are a third-party emailer that works on behalf of domain owners to
|
||||||
|
send their emails from your own server:
|
||||||
|
- you absolutely have to DKIM sign outbound emails
|
||||||
|
- the domain owner has to add the DNS resource record to match the
|
||||||
|
private key, public key, selector, identity, and domain that you create
|
||||||
|
- use caution with the "selector" ... at least one "selector" will already
|
||||||
|
exist in the DNS Zone Record of the domain at the domain owner's server
|
||||||
|
you need to ensure that the "selector" you use is unique
|
||||||
|
Note: since the IP address will not match the domain owner's DNS Zone record
|
||||||
|
you can be certain that email providers that validate based on DomainKey will
|
||||||
|
check the domain owner's DNS Zone record for your DNS resource record. Before
|
||||||
|
sending out emails on behalf of domain owners, ensure they have entered the
|
||||||
|
DNS resource record you provided them.
|
||||||
|
|
||||||
|
Enjoy!
|
||||||
|
Andy
|
||||||
|
|
||||||
|
PS. if you need additional information about DKIM, please see:
|
||||||
|
http://www.dkim.org/info/dkim-faq.html
|
||||||
23
phpmailer/docs/Note_for_SMTP_debugging.txt
Normal file
23
phpmailer/docs/Note_for_SMTP_debugging.txt
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
If you are having problems connecting or sending emails through your SMTP server, please note:
|
||||||
|
|
||||||
|
1. The new rewrite of class.smtp.php provides more information about the processing/errors taking place
|
||||||
|
2. Use the debug functionality of class.smtp.php. To do that, in your own script add the debug level you wish to use. An example of that is:
|
||||||
|
|
||||||
|
$mail->SMTPDebug = 1;
|
||||||
|
$mail->IsSMTP(); // telling the class to use SMTP
|
||||||
|
$mail->SMTPAuth = true; // enable SMTP authentication
|
||||||
|
$mail->Port = 26; // set the SMTP port
|
||||||
|
$mail->Host = "mail.yourhost.com"; // SMTP server
|
||||||
|
$mail->Username = "name@yourhost.com"; // SMTP account username
|
||||||
|
$mail->Password = "your password"; // SMTP account password
|
||||||
|
|
||||||
|
Notes on this:
|
||||||
|
$mail->SMTPDebug = 0; ... will disable debugging (you can also leave this out completely, 0 is the default
|
||||||
|
$mail->SMTPDebug = 1; ... will echo errors and messages
|
||||||
|
$mail->SMTPDebug = 2; ... will echo messages only
|
||||||
|
... and finally, the options are 0, 1, and 2 ... any number greater than 2 will be interpreted as 2
|
||||||
|
|
||||||
|
And finally, don't forget to disable debugging before going into production.
|
||||||
|
|
||||||
|
Enjoy!
|
||||||
|
Andy
|
||||||
148
phpmailer/docs/extending.html
Normal file
148
phpmailer/docs/extending.html
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Examples using phpmailer</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body bgcolor="#FFFFFF">
|
||||||
|
|
||||||
|
<h2>Examples using phpmailer</h2>
|
||||||
|
|
||||||
|
<h3>1. Advanced Example</h3>
|
||||||
|
<p>
|
||||||
|
|
||||||
|
This demonstrates sending out multiple email messages with binary attachments
|
||||||
|
from a MySQL database with multipart/alternative support.<p>
|
||||||
|
<table cellpadding="4" border="1" width="80%">
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="#CCCCCC">
|
||||||
|
<pre>
|
||||||
|
require("class.phpmailer.php");
|
||||||
|
|
||||||
|
$mail = new phpmailer();
|
||||||
|
|
||||||
|
$mail->From = "list@example.com";
|
||||||
|
$mail->FromName = "List manager";
|
||||||
|
$mail->Host = "smtp1.example.com;smtp2.example.com";
|
||||||
|
$mail->Mailer = "smtp";
|
||||||
|
|
||||||
|
@MYSQL_CONNECT("localhost","root","password");
|
||||||
|
@mysql_select_db("my_company");
|
||||||
|
$query<72> =<3D>"SELECT full_name, email,<2C>photo<74>FROM employee<65>WHERE<52>id=$id";
|
||||||
|
$result<6C>=<3D>@MYSQL_QUERY($query);
|
||||||
|
|
||||||
|
while ($row = mysql_fetch_array ($result))
|
||||||
|
{
|
||||||
|
// HTML body
|
||||||
|
$body = "Hello <font size=\"4\">" . $row["full_name"] . "</font>, <p>";
|
||||||
|
$body .= "<i>Your</i> personal photograph to this message.<p>";
|
||||||
|
$body .= "Sincerely, <br>";
|
||||||
|
$body .= "phpmailer List manager";
|
||||||
|
|
||||||
|
// Plain text body (for mail clients that cannot read HTML)
|
||||||
|
$text_body = "Hello " . $row["full_name"] . ", \n\n";
|
||||||
|
$text_body .= "Your personal photograph to this message.\n\n";
|
||||||
|
$text_body .= "Sincerely, \n";
|
||||||
|
$text_body .= "phpmailer List manager";
|
||||||
|
|
||||||
|
$mail->Body = $body;
|
||||||
|
$mail->AltBody = $text_body;
|
||||||
|
$mail->AddAddress($row["email"], $row["full_name"]);
|
||||||
|
$mail->AddStringAttachment($row["photo"], "YourPhoto.jpg");
|
||||||
|
|
||||||
|
if(!$mail->Send())
|
||||||
|
echo "There has been a mail error sending to " . $row["email"] . "<br>";
|
||||||
|
|
||||||
|
// Clear all addresses and attachments for next loop
|
||||||
|
$mail->ClearAddresses();
|
||||||
|
$mail->ClearAttachments();
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<p>
|
||||||
|
|
||||||
|
<h3>2. Extending phpmailer</h3>
|
||||||
|
<p>
|
||||||
|
|
||||||
|
Extending classes with inheritance is one of the most
|
||||||
|
powerful features of object-oriented
|
||||||
|
programming. It allows you to make changes to the
|
||||||
|
original class for your
|
||||||
|
own personal use without hacking the original
|
||||||
|
classes. Plus, it is very
|
||||||
|
easy to do. I've provided an example:
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Here's a class that extends the phpmailer class and sets the defaults
|
||||||
|
for the particular site:<br>
|
||||||
|
PHP include file: <b>mail.inc.php</b>
|
||||||
|
<p>
|
||||||
|
|
||||||
|
<table cellpadding="4" border="1" width="80%">
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="#CCCCCC">
|
||||||
|
<pre>
|
||||||
|
require("class.phpmailer.php");
|
||||||
|
|
||||||
|
class my_phpmailer extends phpmailer {
|
||||||
|
// Set default variables for all new objects
|
||||||
|
var $From = "from@example.com";
|
||||||
|
var $FromName = "Mailer";
|
||||||
|
var $Host = "smtp1.example.com;smtp2.example.com";
|
||||||
|
var $Mailer = "smtp"; // Alternative to IsSMTP()
|
||||||
|
var $WordWrap = 75;
|
||||||
|
|
||||||
|
// Replace the default error_handler
|
||||||
|
function error_handler($msg) {
|
||||||
|
print("My Site Error");
|
||||||
|
print("Description:");
|
||||||
|
printf("%s", $msg);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create an additional function
|
||||||
|
function do_something($something) {
|
||||||
|
// Place your new code here
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
Now here's a normal PHP page in the site, which will have all the defaults set
|
||||||
|
above:<br>
|
||||||
|
Normal PHP file: <b>mail_test.php</b>
|
||||||
|
<p>
|
||||||
|
|
||||||
|
<table cellpadding="4" border="1" width="80%">
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="#CCCCCC">
|
||||||
|
<pre>
|
||||||
|
require("mail.inc.php");
|
||||||
|
|
||||||
|
// Instantiate your new class
|
||||||
|
$mail = new my_phpmailer;
|
||||||
|
|
||||||
|
// Now you only need to add the necessary stuff
|
||||||
|
$mail->AddAddress("josh@example.com", "Josh Adams");
|
||||||
|
$mail->Subject = "Here is the subject";
|
||||||
|
$mail->Body = "This is the message body";
|
||||||
|
$mail->AddAttachment("c:/temp/11-10-00.zip", "new_name.zip"); // optional name
|
||||||
|
|
||||||
|
if(!$mail->Send())
|
||||||
|
{
|
||||||
|
echo "There was an error sending the message";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "Message was sent successfully";
|
||||||
|
</pre>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
67
phpmailer/docs/faq.html
Normal file
67
phpmailer/docs/faq.html
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>PHPMailer FAQ</title>
|
||||||
|
<style>
|
||||||
|
body, p {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
div.width {
|
||||||
|
width: 500px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body bgcolor="#FFFFFF">
|
||||||
|
<center>
|
||||||
|
<div class="width">
|
||||||
|
<h2>PHPMailer FAQ</h2>
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li><b style="background-color: #FFFF00">Q:</b> <b>I'm using the SMTP mailer and I keep on getting a timeout message
|
||||||
|
well before the X seconds I set it for. What gives?</b><br />
|
||||||
|
<b style="background-color: #FFFF00">A:</b> PHP versions 4.0.4pl1 and earlier have a bug in which sockets timeout
|
||||||
|
early. You can fix this by re-compiling PHP 4.0.4pl1 with this fix:
|
||||||
|
<a href="timeoutfix.diff">timeoutfix.diff</a>. Otherwise you can wait for the new PHP release.<br /><br /></li>
|
||||||
|
|
||||||
|
<li><b style="background-color: #FFFF00">Q:</b> <b>I am concerned that using include files will take up too much
|
||||||
|
processing time on my computer. How can I make it run faster?</b><br />
|
||||||
|
<b style="background-color: #FFFF00">A:</b> PHP by itself is very fast. Much faster than ASP or JSP running on
|
||||||
|
the same type of server. This is because it has very little overhead compared
|
||||||
|
to its competitors and it pre-compiles all of
|
||||||
|
its code before it runs each script (in PHP4). However, all of
|
||||||
|
this compiling and re-compiling can take up a lot of valuable
|
||||||
|
computer resources. However, there are programs out there that compile
|
||||||
|
PHP code and store it in memory (or on mmaped files) to reduce the
|
||||||
|
processing immensely. Two of these: <a href="http://apc.communityconnect.com">APC
|
||||||
|
(Alternative PHP Cache)</a> and <a href="http://bwcache.bware.it/index.htm">Afterburner</a>
|
||||||
|
(<a href="http://www.mm4.de/php4win/mod_php4_win32/">Win32 download</a>)
|
||||||
|
are excellent free tools that do just this. If you have the money
|
||||||
|
you might also try <a href="http://www.zend.com">Zend Cache</a>, it is
|
||||||
|
even faster than the open source varieties. All of these tools make your
|
||||||
|
scripts run faster while also reducing the load on your server. I have tried
|
||||||
|
them myself and they are quite stable too.<br /><br /></li>
|
||||||
|
|
||||||
|
<li><b style="background-color: #FFFF00">Q:</b> <b>What mailer gives me the best performance?</b><br />
|
||||||
|
<b style="background-color: #FFFF00">A:</b> On a single machine the <b>sendmail (or Qmail)</b> is fastest overall.
|
||||||
|
Next fastest is mail() to give you the best performance. Both do not have the overhead of SMTP.
|
||||||
|
If you have you have your mail server on a another machine then
|
||||||
|
SMTP is your only option, but you do get the benefit of redundant mail servers.<br />
|
||||||
|
If you are running a mailing list with thousands of names, the fastest mailers in order are: SMTP, sendmail (or Qmail), mail().<br /><br /></li>
|
||||||
|
|
||||||
|
<li><b style="background-color: #FFFF00">Q:</b> <b>When I try to attach a file with on my server I get a
|
||||||
|
"Could not find {file} on filesystem error". Why is this?</b><br />
|
||||||
|
<b style="background-color: #FFFF00">A:</b> If you are using a Unix machine this is probably because the user
|
||||||
|
running your web server does not have read access to the directory in question. If you are using Windows,
|
||||||
|
then the problem probably is that you have used single backslashes to denote directories (\).
|
||||||
|
A single backslash has a special meaning to PHP so these are not
|
||||||
|
valid. Instead use double backslashes ("\\") or a single forward
|
||||||
|
slash ("/").<br /><br /></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</center>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
4
phpmailer/docs/generatedocs.sh
Normal file
4
phpmailer/docs/generatedocs.sh
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Regenerate PHPMailer documentation
|
||||||
|
rm -rf phpdocs/*
|
||||||
|
phpdoc --directory .. --target ./phpdoc --ignore test/,examples/,extras/,test_script/ --sourcecode --force --title PHPMailer
|
||||||
39
phpmailer/docs/pop3_article.txt
Normal file
39
phpmailer/docs/pop3_article.txt
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
This is built for PHP Mailer 1.72 and was not tested with any previous version. It was developed under PHP 4.3.11 (E_ALL). It works under PHP 5 and 5.1 with E_ALL, but not in Strict mode due to var deprecation (but then neither does PHP Mailer either!). It follows the RFC 1939 standard explicitly and is fully commented.
|
||||||
|
|
||||||
|
With that noted, here is how to implement it:
|
||||||
|
Install the class file
|
||||||
|
|
||||||
|
I didn't want to modify the PHP Mailer classes at all, so you will have to include/require this class along with the base one. It can sit quite happily in the phpmailer-1.72 directory:
|
||||||
|
[geshi lang=php] require 'phpmailer-1.72/class.phpmailer.php'; require 'phpmailer-1.72/class.pop3.php'; [/geshi]
|
||||||
|
When you need it, create your POP3 object
|
||||||
|
|
||||||
|
Right before I invoke PHP Mailer I activate the POP3 authorisation. POP3 before SMTP is a process whereby you login to your web hosts POP3 mail server BEFORE sending out any emails via SMTP. The POP3 logon 'verifies' your ability to send email by SMTP, which typically otherwise blocks you. On my web host (Pair Networks) a single POP3 logon is enough to 'verify' you for 90 minutes. Here is some sample PHP code that activates the POP3 logon and then sends an email via PHP Mailer:
|
||||||
|
[geshi lang=php] Authorise('pop3.example.com', 110, 30, 'mailer', 'password', 1); $mail = new PHPMailer(); $mail->SMTPDebug = 2; $mail->IsSMTP(); $mail->IsHTML(false); $mail->Host = 'relay.example.com'; $mail->From = 'mailer@example.com'; $mail->FromName = 'Example Mailer'; $mail->Subject = 'My subject'; $mail->Body = 'Hello world'; $mail->AddAddress('rich@corephp.co.uk', 'Richard Davey'); if (!$mail->Send()) { echo $mail->ErrorInfo; } ?> [/geshi]
|
||||||
|
|
||||||
|
The PHP Mailer parts of this code should be obvious to anyone who has used PHP Mailer before. One thing to note - you almost certainly will not need to use SMTP Authentication *and* POP3 before SMTP together. The Authorisation method is a proxy method to all of the others within that class. There are Connect, Logon and Disconnect methods available, but I wrapped them in the single Authorisation one to make things easier.
|
||||||
|
The Parameters
|
||||||
|
|
||||||
|
The Authorise parameters are as follows:
|
||||||
|
[geshi lang=php]$pop->Authorise('pop3.example.com', 110, 30, 'mailer', 'password', 1);[/geshi]
|
||||||
|
|
||||||
|
1. pop3.example.com - The POP3 Mail Server Name (hostname or IP address)
|
||||||
|
2. 110 - The POP3 Port on which to connect (default is usually 110, but check with your host)
|
||||||
|
3. 30 - A connection time-out value (in seconds)
|
||||||
|
4. mailer - The POP3 Username required to logon
|
||||||
|
5. password - The POP3 Password required to logon
|
||||||
|
6. 1 - The class debug level (0 = off, 1+ = debug output is echoed to the browser)
|
||||||
|
|
||||||
|
Final Comments + the Download
|
||||||
|
|
||||||
|
1) This class does not support APOP connections. This is only because I did not have an APOP server to test with, but if you'd like to see that added just contact me.
|
||||||
|
|
||||||
|
2) Opening and closing lots of POP3 connections can be quite a resource/network drain. If you need to send a whole batch of emails then just perform the authentication once at the start, and then loop through your mail sending script. Providing this process doesn't take longer than the verification period lasts on your POP3 server, you should be fine. With my host that period is 90 minutes, i.e. plenty of time.
|
||||||
|
|
||||||
|
3) If you have heavy requirements for this script (i.e. send a LOT of email on a frequent basis) then I would advise seeking out an alternative sending method (direct SMTP ideally). If this isn't possible then you could modify this class so the 'last authorised' date is recorded somewhere (MySQL, Flat file, etc) meaning you only open a new connection if the old one has expired, saving you precious overhead.
|
||||||
|
|
||||||
|
4) There are lots of other POP3 classes for PHP available. However most of them implement the full POP3 command set, where-as this one is purely for authentication, and much lighter as a result. However using any of the other POP3 classes to just logon to your server would have the same net result. At the end of the day, use whatever method you feel most comfortable with.
|
||||||
|
Download
|
||||||
|
|
||||||
|
Here is the full class file plus my test script: POP_before_SMTP_PHPMailer.zip (4 KB) - Please note that it does not include PHPMailer itself.
|
||||||
|
|
||||||
|
My thanks to Chris Ryan for the inspiration (even if indirectly, via his SMTP class)
|
||||||
44
phpmailer/docs/use_gmail.txt
Normal file
44
phpmailer/docs/use_gmail.txt
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// example on using PHPMailer with GMAIL
|
||||||
|
|
||||||
|
include("class.phpmailer.php");
|
||||||
|
include("class.smtp.php"); // note, this is optional - gets called from main class if not already loaded
|
||||||
|
|
||||||
|
$mail = new PHPMailer();
|
||||||
|
|
||||||
|
$body = file_get_contents('contents.html');
|
||||||
|
|
||||||
|
$mail->IsSMTP();
|
||||||
|
$mail->SMTPAuth = true; // enable SMTP authentication
|
||||||
|
$mail->SMTPSecure = "ssl"; // sets the prefix to the servier
|
||||||
|
$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
|
||||||
|
$mail->Port = 465; // set the SMTP port
|
||||||
|
|
||||||
|
$mail->Username = "yourname@gmail.com"; // GMAIL username
|
||||||
|
$mail->Password = "password"; // GMAIL password
|
||||||
|
|
||||||
|
$mail->From = "replyto@yourdomain.com";
|
||||||
|
$mail->FromName = "Webmaster";
|
||||||
|
$mail->Subject = "This is the subject";
|
||||||
|
$mail->AltBody = "This is the body when user views in plain text format"; //Text Body
|
||||||
|
$mail->WordWrap = 50; // set word wrap
|
||||||
|
|
||||||
|
$mail->MsgHTML($body);
|
||||||
|
|
||||||
|
$mail->AddReplyTo("replyto@yourdomain.com","Webmaster");
|
||||||
|
|
||||||
|
$mail->AddAttachment("/path/to/file.zip"); // attachment
|
||||||
|
$mail->AddAttachment("/path/to/image.jpg", "new.jpg"); // attachment
|
||||||
|
|
||||||
|
$mail->AddAddress("username@domain.com","First Last");
|
||||||
|
|
||||||
|
$mail->IsHTML(true); // send as HTML
|
||||||
|
|
||||||
|
if(!$mail->Send()) {
|
||||||
|
echo "Mailer Error: " . $mail->ErrorInfo;
|
||||||
|
} else {
|
||||||
|
echo "Message has been sent";
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
20
phpmailer/examples/contents.html
Normal file
20
phpmailer/examples/contents.html
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<body style="margin: 10px;">
|
||||||
|
<div style="width: 640px; font-family: Arial, Helvetica, sans-serif; font-size: 11px;">
|
||||||
|
<div align="center"><img src="images/phpmailer.gif" style="height: 90px; width: 340px"></div><br>
|
||||||
|
<br>
|
||||||
|
This is a test of PHPMailer.<br>
|
||||||
|
<br>
|
||||||
|
This particular example uses <strong>HTML</strong>, with a <div> tag and inline<br>
|
||||||
|
styles.<br>
|
||||||
|
<br>
|
||||||
|
Also note the use of the PHPMailer logo above with no specific code to handle
|
||||||
|
including it.<br />
|
||||||
|
Included are two attachments:<br />
|
||||||
|
phpmailer.gif is an attachment and used inline as a graphic (above)<br />
|
||||||
|
phpmailer_mini.gif is an attachment<br />
|
||||||
|
<br />
|
||||||
|
PHPMailer:<br />
|
||||||
|
Author: Andy Prevost (codeworxtech@users.sourceforge.net)<br />
|
||||||
|
Author: Marcus Bointon (coolbru@users.sourceforge.net)<br />
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
BIN
phpmailer/examples/images/phpmailer.gif
Normal file
BIN
phpmailer/examples/images/phpmailer.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
BIN
phpmailer/examples/images/phpmailer_mini.gif
Normal file
BIN
phpmailer/examples/images/phpmailer_mini.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
50
phpmailer/examples/index.html
Normal file
50
phpmailer/examples/index.html
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
This release of PHPMailer (v5.0.0) sets a new milestone in the development
|
||||||
|
cycle of PHPMailer. First, class.phpmailer.php has a small footprint (65.7 Kb),
|
||||||
|
while class.smtp.php is even smaller than before (at only 25.0 Kb).<br />
|
||||||
|
<br />
|
||||||
|
We have maintained all functionality and added Exception handling unique to
|
||||||
|
PHP 5/6.<br />
|
||||||
|
<br />
|
||||||
|
There is only one function that has been removed: that is getFile(). The reason
|
||||||
|
for this is that getFile() became a wrapper for the PHP function 'file_get_contents()'
|
||||||
|
and nothing more. Rather than burden the class with a function already available
|
||||||
|
in PHP, we decided to remove it.<br />
|
||||||
|
<br />
|
||||||
|
Our new Exception handling provides your own scripts far more power than ever.<br />
|
||||||
|
<br />
|
||||||
|
We have also enhanced the "packaging" of PHPMailer with an entirely new set of
|
||||||
|
examples. Included are both basic and advanced examples showing how you can take
|
||||||
|
advantage of PHP Exception handling to improve your own scripts.<br />
|
||||||
|
<br />
|
||||||
|
A few things to note about PHPMailer:
|
||||||
|
<ul>
|
||||||
|
<li>the use of $mail->AltBody is completely optional. If not used, PHPMailer
|
||||||
|
will use the HTML text with htmlentities().<br />
|
||||||
|
We also highly recommend using HTML2Text authored by Jon Abernathy. The class description
|
||||||
|
and download can be viewed at: http://www.chuggnutt.com/html2text but is also bundled with
|
||||||
|
PHPMailer in ./extras/ .
|
||||||
|
</li>
|
||||||
|
<li>there is no specific code to define image or attachment types ... that is handled
|
||||||
|
automatically by PHPMailer when it parses the images</li>
|
||||||
|
</ul>
|
||||||
|
A note to users that want to use SMTP with PHPMailer. The most common problems are:
|
||||||
|
<ul>
|
||||||
|
<li>wrong port ... most ISP (Internet Service Providers) will not allow relaying through
|
||||||
|
their servers. If that's the case with your ISP, try using port 26.
|
||||||
|
</li>
|
||||||
|
<li>wrong authentication information (username and/or password) ... don't forget that
|
||||||
|
many servers require the account name to be in the format of the full email address.
|
||||||
|
</li>
|
||||||
|
<li>... if these tips do not get your SMTP settings working, we have a debug mode
|
||||||
|
for helping you determine the problem. Insert this after $mail->IsSMTP();<br />
|
||||||
|
$mail->SMTPDebug = 2; // enables SMTP debug information (for testing)<br />
|
||||||
|
note that a setting of 2 will display all errors and messages generated by the SMTP
|
||||||
|
server<br />
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
Our examples all use an HTML file in the /examples folder. To see what the email SHOULD
|
||||||
|
look like in your HTML compatible email viewer: <a href="contents.html">click here</a><br>
|
||||||
|
<br />
|
||||||
|
From the PHPMailer team:<br />
|
||||||
|
Author: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net (and Project Administrator)<br />
|
||||||
|
Author: Marcus Bointon (coolbru) coolbru@users.sourceforge.net<br />
|
||||||
58
phpmailer/examples/test_db_smtp_basic.php
Normal file
58
phpmailer/examples/test_db_smtp_basic.php
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>PHPMailer - MySQL Database - SMTP basic test with authentication</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
//error_reporting(E_ALL);
|
||||||
|
error_reporting(E_STRICT);
|
||||||
|
|
||||||
|
date_default_timezone_set('America/Toronto');
|
||||||
|
|
||||||
|
require_once('../class.phpmailer.php');
|
||||||
|
//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
|
||||||
|
|
||||||
|
$mail = new PHPMailer();
|
||||||
|
|
||||||
|
$body = file_get_contents('contents.html');
|
||||||
|
$body = preg_replace('/[\]/','',$body);
|
||||||
|
|
||||||
|
$mail->IsSMTP(); // telling the class to use SMTP
|
||||||
|
$mail->Host = "smtp1.site.com;smtp2.site.com";
|
||||||
|
$mail->SMTPAuth = true; // enable SMTP authentication
|
||||||
|
$mail->SMTPKeepAlive = true; // SMTP connection will not close after each email sent
|
||||||
|
$mail->Host = "mail.yourdomain.com"; // sets the SMTP server
|
||||||
|
$mail->Port = 26; // set the SMTP port for the GMAIL server
|
||||||
|
$mail->Username = "yourname@yourdomain"; // SMTP account username
|
||||||
|
$mail->Password = "yourpassword"; // SMTP account password
|
||||||
|
$mail->SetFrom('list@mydomain.com', 'List manager');
|
||||||
|
$mail->AddReplyTo('list@mydomain.com', 'List manager');
|
||||||
|
|
||||||
|
$mail->Subject = "PHPMailer Test Subject via smtp, basic with authentication";
|
||||||
|
|
||||||
|
@MYSQL_CONNECT("localhost","root","password");
|
||||||
|
@mysql_select_db("my_company");
|
||||||
|
$query = "SELECT full_name, email, photo FROM employee WHERE id=$id";
|
||||||
|
$result = @MYSQL_QUERY($query);
|
||||||
|
|
||||||
|
while ($row = mysql_fetch_array ($result)) {
|
||||||
|
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
|
||||||
|
$mail->MsgHTML($body);
|
||||||
|
$mail->AddAddress($row["email"], $row["full_name"]);
|
||||||
|
$mail->AddStringAttachment($row["photo"], "YourPhoto.jpg");
|
||||||
|
|
||||||
|
if(!$mail->Send()) {
|
||||||
|
echo "Mailer Error (" . str_replace("@", "@", $row["email"]) . ') ' . $mail->ErrorInfo . '<br />';
|
||||||
|
} else {
|
||||||
|
echo "Message sent to :" . $row["full_name"] . ' (' . str_replace("@", "@", $row["email"]) . ')<br />';
|
||||||
|
}
|
||||||
|
// Clear all addresses and attachments for next loop
|
||||||
|
$mail->ClearAddresses();
|
||||||
|
$mail->ClearAttachments();
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
30
phpmailer/examples/test_mail_advanced.php
Normal file
30
phpmailer/examples/test_mail_advanced.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>PHPMailer - Mail() advanced test</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../class.phpmailer.php';
|
||||||
|
|
||||||
|
$mail = new PHPMailer(true); //defaults to using php "mail()"; the true param means it will throw exceptions on errors, which we need to catch
|
||||||
|
|
||||||
|
try {
|
||||||
|
$mail->AddAddress('whoto@otherdomain.com', 'John Doe');
|
||||||
|
$mail->SetFrom('name@yourdomain.com', 'First Last');
|
||||||
|
$mail->AddReplyTo('name@yourdomain.com', 'First Last');
|
||||||
|
$mail->Subject = 'PHPMailer Test Subject via mail(), advanced';
|
||||||
|
$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
|
||||||
|
$mail->MsgHTML(file_get_contents('contents.html'));
|
||||||
|
$mail->AddAttachment('images/phpmailer.gif'); // attachment
|
||||||
|
$mail->AddAttachment('images/phpmailer_mini.gif'); // attachment
|
||||||
|
$mail->Send();
|
||||||
|
echo "Message Sent OK</p>\n";
|
||||||
|
} catch (phpmailerException $e) {
|
||||||
|
echo $e->errorMessage(); //Pretty error messages from PHPMailer
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo $e->getMessage(); //Boring error messages from anything else!
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
41
phpmailer/examples/test_mail_basic.php
Normal file
41
phpmailer/examples/test_mail_basic.php
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>PHPMailer - Mail() basic test</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once('../class.phpmailer.php');
|
||||||
|
|
||||||
|
$mail = new PHPMailer(); // defaults to using php "mail()"
|
||||||
|
|
||||||
|
$body = file_get_contents('contents.html');
|
||||||
|
$body = preg_replace('/[\]/','',$body);
|
||||||
|
|
||||||
|
$mail->SetFrom('name@yourdomain.com', 'First Last');
|
||||||
|
|
||||||
|
$mail->AddReplyTo("name@yourdomain.com","First Last");
|
||||||
|
|
||||||
|
$address = "whoto@otherdomain.com";
|
||||||
|
$mail->AddAddress($address, "John Doe");
|
||||||
|
|
||||||
|
$mail->Subject = "PHPMailer Test Subject via mail(), basic";
|
||||||
|
|
||||||
|
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
|
||||||
|
|
||||||
|
$mail->MsgHTML($body);
|
||||||
|
|
||||||
|
$mail->AddAttachment("images/phpmailer.gif"); // attachment
|
||||||
|
$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment
|
||||||
|
|
||||||
|
if(!$mail->Send()) {
|
||||||
|
echo "Mailer Error: " . $mail->ErrorInfo;
|
||||||
|
} else {
|
||||||
|
echo "Message sent!";
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
39
phpmailer/examples/test_pop_before_smtp_advanced.php
Normal file
39
phpmailer/examples/test_pop_before_smtp_advanced.php
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>POP before SMTP Test</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once('../class.phpmailer.php');
|
||||||
|
require_once('../class.pop3.php'); // required for POP before SMTP
|
||||||
|
|
||||||
|
$pop = new POP3();
|
||||||
|
$pop->Authorise('pop3.yourdomain.com', 110, 30, 'username', 'password', 1);
|
||||||
|
|
||||||
|
$mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch
|
||||||
|
|
||||||
|
$mail->IsSMTP();
|
||||||
|
|
||||||
|
try {
|
||||||
|
$mail->SMTPDebug = 2;
|
||||||
|
$mail->Host = 'pop3.yourdomain.com';
|
||||||
|
$mail->AddAddress('whoto@otherdomain.com', 'John Doe');
|
||||||
|
$mail->SetFrom('name@yourdomain.com', 'First Last');
|
||||||
|
$mail->AddReplyTo('name@yourdomain.com', 'First Last');
|
||||||
|
$mail->Subject = 'PHPMailer Test Subject via mail(), advanced';
|
||||||
|
$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
|
||||||
|
$mail->MsgHTML(file_get_contents('contents.html'));
|
||||||
|
$mail->AddAttachment('images/phpmailer.gif'); // attachment
|
||||||
|
$mail->AddAttachment('images/phpmailer_mini.gif'); // attachment
|
||||||
|
$mail->Send();
|
||||||
|
echo "Message Sent OK</p>\n";
|
||||||
|
} catch (phpmailerException $e) {
|
||||||
|
echo $e->errorMessage(); //Pretty error messages from PHPMailer
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo $e->getMessage(); //Boring error messages from anything else!
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
49
phpmailer/examples/test_pop_before_smtp_basic.php
Normal file
49
phpmailer/examples/test_pop_before_smtp_basic.php
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>POP before SMTP Test</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once('../class.phpmailer.php');
|
||||||
|
require_once('../class.pop3.php'); // required for POP before SMTP
|
||||||
|
|
||||||
|
$pop = new POP3();
|
||||||
|
$pop->Authorise('pop3.yourdomain.com', 110, 30, 'username', 'password', 1);
|
||||||
|
|
||||||
|
$mail = new PHPMailer();
|
||||||
|
|
||||||
|
$body = file_get_contents('contents.html');
|
||||||
|
$body = preg_replace('/[\]/','',$body);
|
||||||
|
|
||||||
|
$mail->IsSMTP();
|
||||||
|
$mail->SMTPDebug = 2;
|
||||||
|
$mail->Host = 'pop3.yourdomain.com';
|
||||||
|
|
||||||
|
$mail->SetFrom('name@yourdomain.com', 'First Last');
|
||||||
|
|
||||||
|
$mail->AddReplyTo("name@yourdomain.com","First Last");
|
||||||
|
|
||||||
|
$mail->Subject = "PHPMailer Test Subject via POP before SMTP, basic";
|
||||||
|
|
||||||
|
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
|
||||||
|
|
||||||
|
$mail->MsgHTML($body);
|
||||||
|
|
||||||
|
$address = "whoto@otherdomain.com";
|
||||||
|
$mail->AddAddress($address, "John Doe");
|
||||||
|
|
||||||
|
$mail->AddAttachment("images/phpmailer.gif"); // attachment
|
||||||
|
$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment
|
||||||
|
|
||||||
|
|
||||||
|
if(!$mail->Send()) {
|
||||||
|
echo "Mailer Error: " . $mail->ErrorInfo;
|
||||||
|
} else {
|
||||||
|
echo "Message sent!";
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
33
phpmailer/examples/test_sendmail_advanced.php
Normal file
33
phpmailer/examples/test_sendmail_advanced.php
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>PHPMailer - Sendmail advanced test</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once('../class.phpmailer.php');
|
||||||
|
|
||||||
|
$mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch
|
||||||
|
$mail->IsSendmail(); // telling the class to use SendMail transport
|
||||||
|
|
||||||
|
try {
|
||||||
|
$mail->AddAddress('whoto@otherdomain.com', 'John Doe');
|
||||||
|
$mail->SetFrom('name@yourdomain.com', 'First Last');
|
||||||
|
$mail->AddReplyTo('name@yourdomain.com', 'First Last');
|
||||||
|
$mail->Subject = 'PHPMailer Test Subject via mail(), advanced';
|
||||||
|
$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
|
||||||
|
$mail->MsgHTML(file_get_contents('contents.html'));
|
||||||
|
$mail->AddAttachment('images/phpmailer.gif'); // attachment
|
||||||
|
$mail->AddAttachment('images/phpmailer_mini.gif'); // attachment
|
||||||
|
$mail->Send();
|
||||||
|
echo "Message Sent OK</p>\n";
|
||||||
|
} catch (phpmailerException $e) {
|
||||||
|
echo $e->errorMessage(); //Pretty error messages from PHPMailer
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo $e->getMessage(); //Boring error messages from anything else!
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
43
phpmailer/examples/test_sendmail_basic.php
Normal file
43
phpmailer/examples/test_sendmail_basic.php
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>PHPMailer - Sendmail basic test</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once('../class.phpmailer.php');
|
||||||
|
|
||||||
|
$mail = new PHPMailer(); // defaults to using php "mail()"
|
||||||
|
|
||||||
|
$mail->IsSendmail(); // telling the class to use SendMail transport
|
||||||
|
|
||||||
|
$body = file_get_contents('contents.html');
|
||||||
|
$body = preg_replace('/[\]/','',$body);
|
||||||
|
|
||||||
|
$mail->SetFrom('name@yourdomain.com', 'First Last');
|
||||||
|
|
||||||
|
$mail->AddReplyTo("name@yourdomain.com","First Last");
|
||||||
|
|
||||||
|
$address = "whoto@otherdomain.com";
|
||||||
|
$mail->AddAddress($address, "John Doe");
|
||||||
|
|
||||||
|
$mail->Subject = "PHPMailer Test Subject via Sendmail, basic";
|
||||||
|
|
||||||
|
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
|
||||||
|
|
||||||
|
$mail->MsgHTML($body);
|
||||||
|
|
||||||
|
$mail->AddAttachment("images/phpmailer.gif"); // attachment
|
||||||
|
$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment
|
||||||
|
|
||||||
|
if(!$mail->Send()) {
|
||||||
|
echo "Mailer Error: " . $mail->ErrorInfo;
|
||||||
|
} else {
|
||||||
|
echo "Message sent!";
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
42
phpmailer/examples/test_smtp_advanced.php
Normal file
42
phpmailer/examples/test_smtp_advanced.php
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>PHPMailer - SMTP advanced test with authentication</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once('../class.phpmailer.php');
|
||||||
|
//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
|
||||||
|
|
||||||
|
$mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch
|
||||||
|
|
||||||
|
$mail->IsSMTP(); // telling the class to use SMTP
|
||||||
|
|
||||||
|
try {
|
||||||
|
$mail->Host = "mail.yourdomain.com"; // SMTP server
|
||||||
|
$mail->SMTPDebug = 2; // enables SMTP debug information (for testing)
|
||||||
|
$mail->SMTPAuth = true; // enable SMTP authentication
|
||||||
|
$mail->Host = "mail.yourdomain.com"; // sets the SMTP server
|
||||||
|
$mail->Port = 26; // set the SMTP port for the GMAIL server
|
||||||
|
$mail->Username = "yourname@yourdomain"; // SMTP account username
|
||||||
|
$mail->Password = "yourpassword"; // SMTP account password
|
||||||
|
$mail->AddAddress('whoto@otherdomain.com', 'John Doe');
|
||||||
|
$mail->SetFrom('name@yourdomain.com', 'First Last');
|
||||||
|
$mail->AddReplyTo('name@yourdomain.com', 'First Last');
|
||||||
|
$mail->Subject = 'PHPMailer Test Subject via mail(), advanced';
|
||||||
|
$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
|
||||||
|
$mail->MsgHTML(file_get_contents('contents.html'));
|
||||||
|
$mail->AddAttachment('images/phpmailer.gif'); // attachment
|
||||||
|
$mail->AddAttachment('images/phpmailer_mini.gif'); // attachment
|
||||||
|
$mail->Send();
|
||||||
|
echo "Message Sent OK</p>\n";
|
||||||
|
} catch (phpmailerException $e) {
|
||||||
|
echo $e->errorMessage(); //Pretty error messages from PHPMailer
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo $e->getMessage(); //Boring error messages from anything else!
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
36
phpmailer/examples/test_smtp_advanced_no_auth.php
Normal file
36
phpmailer/examples/test_smtp_advanced_no_auth.php
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>PHPMailer - SMTP advanced test with no authentication</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once('../class.phpmailer.php');
|
||||||
|
//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
|
||||||
|
|
||||||
|
$mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch
|
||||||
|
|
||||||
|
$mail->IsSMTP(); // telling the class to use SMTP
|
||||||
|
|
||||||
|
try {
|
||||||
|
$mail->Host = "mail.yourdomain.com"; // SMTP server
|
||||||
|
$mail->SMTPDebug = 2; // enables SMTP debug information (for testing)
|
||||||
|
$mail->AddAddress('whoto@otherdomain.com', 'John Doe');
|
||||||
|
$mail->SetFrom('name@yourdomain.com', 'First Last');
|
||||||
|
$mail->AddReplyTo('name@yourdomain.com', 'First Last');
|
||||||
|
$mail->Subject = 'PHPMailer Test Subject via mail(), advanced';
|
||||||
|
$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
|
||||||
|
$mail->MsgHTML(file_get_contents('contents.html'));
|
||||||
|
$mail->AddAttachment('images/phpmailer.gif'); // attachment
|
||||||
|
$mail->AddAttachment('images/phpmailer_mini.gif'); // attachment
|
||||||
|
$mail->Send();
|
||||||
|
echo "Message Sent OK</p>\n";
|
||||||
|
} catch (phpmailerException $e) {
|
||||||
|
echo $e->errorMessage(); //Pretty error messages from PHPMailer
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo $e->getMessage(); //Boring error messages from anything else!
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
58
phpmailer/examples/test_smtp_basic.php
Normal file
58
phpmailer/examples/test_smtp_basic.php
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>PHPMailer - SMTP basic test with authentication</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
//error_reporting(E_ALL);
|
||||||
|
error_reporting(E_STRICT);
|
||||||
|
|
||||||
|
date_default_timezone_set('America/Toronto');
|
||||||
|
|
||||||
|
require_once('../class.phpmailer.php');
|
||||||
|
//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
|
||||||
|
|
||||||
|
$mail = new PHPMailer();
|
||||||
|
|
||||||
|
$body = file_get_contents('contents.html');
|
||||||
|
$body = preg_replace('/[\]/','',$body);
|
||||||
|
|
||||||
|
$mail->IsSMTP(); // telling the class to use SMTP
|
||||||
|
$mail->Host = "mail.yourdomain.com"; // SMTP server
|
||||||
|
$mail->SMTPDebug = 2; // enables SMTP debug information (for testing)
|
||||||
|
// 1 = errors and messages
|
||||||
|
// 2 = messages only
|
||||||
|
$mail->SMTPAuth = true; // enable SMTP authentication
|
||||||
|
$mail->Host = "mail.yourdomain.com"; // sets the SMTP server
|
||||||
|
$mail->Port = 26; // set the SMTP port for the GMAIL server
|
||||||
|
$mail->Username = "yourname@yourdomain"; // SMTP account username
|
||||||
|
$mail->Password = "yourpassword"; // SMTP account password
|
||||||
|
|
||||||
|
$mail->SetFrom('name@yourdomain.com', 'First Last');
|
||||||
|
|
||||||
|
$mail->AddReplyTo("name@yourdomain.com","First Last");
|
||||||
|
|
||||||
|
$mail->Subject = "PHPMailer Test Subject via smtp, basic with authentication";
|
||||||
|
|
||||||
|
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
|
||||||
|
|
||||||
|
$mail->MsgHTML($body);
|
||||||
|
|
||||||
|
$address = "whoto@otherdomain.com";
|
||||||
|
$mail->AddAddress($address, "John Doe");
|
||||||
|
|
||||||
|
$mail->AddAttachment("images/phpmailer.gif"); // attachment
|
||||||
|
$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment
|
||||||
|
|
||||||
|
if(!$mail->Send()) {
|
||||||
|
echo "Mailer Error: " . $mail->ErrorInfo;
|
||||||
|
} else {
|
||||||
|
echo "Message sent!";
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
53
phpmailer/examples/test_smtp_basic_no_auth.php
Normal file
53
phpmailer/examples/test_smtp_basic_no_auth.php
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>PHPMailer - SMTP basic test with no authentication</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
//error_reporting(E_ALL);
|
||||||
|
error_reporting(E_STRICT);
|
||||||
|
|
||||||
|
date_default_timezone_set('America/Toronto');
|
||||||
|
|
||||||
|
require_once('../class.phpmailer.php');
|
||||||
|
//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
|
||||||
|
|
||||||
|
$mail = new PHPMailer();
|
||||||
|
|
||||||
|
$body = file_get_contents('contents.html');
|
||||||
|
$body = preg_replace('/[\]/','',$body);
|
||||||
|
|
||||||
|
$mail->IsSMTP(); // telling the class to use SMTP
|
||||||
|
$mail->Host = "mail.yourdomain.com"; // SMTP server
|
||||||
|
$mail->SMTPDebug = 2; // enables SMTP debug information (for testing)
|
||||||
|
// 1 = errors and messages
|
||||||
|
// 2 = messages only
|
||||||
|
|
||||||
|
$mail->SetFrom('name@yourdomain.com', 'First Last');
|
||||||
|
|
||||||
|
$mail->AddReplyTo("name@yourdomain.com","First Last");
|
||||||
|
|
||||||
|
$mail->Subject = "PHPMailer Test Subject via smtp, basic with no authentication";
|
||||||
|
|
||||||
|
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
|
||||||
|
|
||||||
|
$mail->MsgHTML($body);
|
||||||
|
|
||||||
|
$address = "whoto@otherdomain.com";
|
||||||
|
$mail->AddAddress($address, "John Doe");
|
||||||
|
|
||||||
|
$mail->AddAttachment("images/phpmailer.gif"); // attachment
|
||||||
|
$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment
|
||||||
|
|
||||||
|
if(!$mail->Send()) {
|
||||||
|
echo "Mailer Error: " . $mail->ErrorInfo;
|
||||||
|
} else {
|
||||||
|
echo "Message sent!";
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
40
phpmailer/examples/test_smtp_gmail_advanced.php
Normal file
40
phpmailer/examples/test_smtp_gmail_advanced.php
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>PHPMailer - SMTP (Gmail) advanced test</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<?php
|
||||||
|
require_once('../class.phpmailer.php');
|
||||||
|
//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
|
||||||
|
|
||||||
|
$mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch
|
||||||
|
|
||||||
|
$mail->IsSMTP(); // telling the class to use SMTP
|
||||||
|
|
||||||
|
try {
|
||||||
|
//$mail->Host = "mail.yourdomain.com"; // SMTP server
|
||||||
|
$mail->SMTPDebug = 2; // enables SMTP debug information (for testing)
|
||||||
|
$mail->SMTPAuth = true; // enable SMTP authentication
|
||||||
|
$mail->SMTPSecure = "tls"; // sets the prefix to the servier
|
||||||
|
$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
|
||||||
|
$mail->Port = 587; // set the SMTP port for the GMAIL server
|
||||||
|
$mail->Username = "username@gmail.com"; // GMAIL username
|
||||||
|
$mail->Password = "password"; // GMAIL password
|
||||||
|
$mail->AddAddress('Recipient@example.com', 'Recipient Name');
|
||||||
|
$mail->SetFrom('Sender@example.com', 'Sender Name');
|
||||||
|
//$mail->AddReplyTo('name@yourdomain.com', 'First Last');
|
||||||
|
$mail->Subject = 'PHPMailer Test Subject via mail(), advanced';
|
||||||
|
$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
|
||||||
|
$mail->MsgHTML(file_get_contents('contents.html'));
|
||||||
|
$mail->AddAttachment('images/phpmailer.gif'); // attachment
|
||||||
|
$mail->AddAttachment('images/phpmailer_mini.gif'); // attachment
|
||||||
|
$mail->Send();
|
||||||
|
echo "Message Sent OK</p>\n";
|
||||||
|
} catch (phpmailerException $e) {
|
||||||
|
echo $e->errorMessage(); //Pretty error messages from PHPMailer
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo $e->getMessage(); //Boring error messages from anything else!
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
58
phpmailer/examples/test_smtp_gmail_basic.php
Normal file
58
phpmailer/examples/test_smtp_gmail_basic.php
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>PHPMailer - SMTP (Gmail) basic test</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
//error_reporting(E_ALL);
|
||||||
|
error_reporting(E_STRICT);
|
||||||
|
|
||||||
|
//date_default_timezone_set('America/Toronto');
|
||||||
|
|
||||||
|
require_once('../class.phpmailer.php');
|
||||||
|
//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
|
||||||
|
|
||||||
|
$mail = new PHPMailer();
|
||||||
|
|
||||||
|
$body = file_get_contents('contents.html');
|
||||||
|
$body = preg_replace('/[\]/','',$body);
|
||||||
|
|
||||||
|
$mail->IsSMTP(); // telling the class to use SMTP
|
||||||
|
$mail->SMTPDebug = 2; // enables SMTP debug information (for testing)
|
||||||
|
// 1 = errors and messages
|
||||||
|
// 2 = messages only
|
||||||
|
$mail->SMTPAuth = true; // enable SMTP authentication
|
||||||
|
$mail->SMTPSecure = "tls"; // sets the prefix to the servier
|
||||||
|
$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
|
||||||
|
$mail->Port = 587; // set the SMTP port for the GMAIL server
|
||||||
|
$mail->Username = "yourusername@gmail.com"; // GMAIL username
|
||||||
|
$mail->Password = "yourpassword"; // GMAIL password
|
||||||
|
|
||||||
|
$mail->SetFrom('sender@example.com', 'First Last');
|
||||||
|
|
||||||
|
$mail->AddReplyTo("reply-to@example.com","First Last");
|
||||||
|
|
||||||
|
$mail->Subject = "PHPMailer Test Subject via smtp (Gmail), basic";
|
||||||
|
|
||||||
|
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
|
||||||
|
|
||||||
|
$mail->MsgHTML($body);
|
||||||
|
|
||||||
|
$address = "recipient@example.com";
|
||||||
|
$mail->AddAddress($address, "Recipient Name");
|
||||||
|
|
||||||
|
$mail->AddAttachment("images/phpmailer.gif"); // attachment
|
||||||
|
$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment
|
||||||
|
|
||||||
|
if(!$mail->Send()) {
|
||||||
|
echo "Mailer Error: " . $mail->ErrorInfo;
|
||||||
|
} else {
|
||||||
|
echo "Message sent!";
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
696
phpmailer/extras/class.html2text.php
Normal file
696
phpmailer/extras/class.html2text.php
Normal file
@@ -0,0 +1,696 @@
|
|||||||
|
<?php
|
||||||
|
/*************************************************************************
|
||||||
|
* *
|
||||||
|
* Converts HTML to formatted plain text *
|
||||||
|
* *
|
||||||
|
* Portions Copyright (c) 2005-2007 Jon Abernathy <jon@chuggnutt.com> *
|
||||||
|
* This version from https://github.com/mtibben/html2text *
|
||||||
|
* *
|
||||||
|
* This script is free software; you can redistribute it and/or modify *
|
||||||
|
* it under the terms of the GNU General Public License as published by *
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or *
|
||||||
|
* (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* The GNU General Public License can be found at *
|
||||||
|
* http://www.gnu.org/copyleft/gpl.html. *
|
||||||
|
* *
|
||||||
|
* This script is distributed in the hope that it will be useful, *
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
|
* GNU General Public License for more details. *
|
||||||
|
* *
|
||||||
|
*************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
class html2text
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains the HTML content to convert.
|
||||||
|
*
|
||||||
|
* @var string $html
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
public $html;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains the converted, formatted text.
|
||||||
|
*
|
||||||
|
* @var string $text
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
public $text;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maximum width of the formatted text, in columns.
|
||||||
|
*
|
||||||
|
* Set this value to 0 (or less) to ignore word wrapping
|
||||||
|
* and not constrain text to a fixed-width column.
|
||||||
|
*
|
||||||
|
* @var integer $width
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
public $width = 70;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of preg* regular expression patterns to search for,
|
||||||
|
* used in conjunction with $replace.
|
||||||
|
*
|
||||||
|
* @var array $search
|
||||||
|
* @access public
|
||||||
|
* @see $replace
|
||||||
|
*/
|
||||||
|
public $search = array(
|
||||||
|
"/\r/", // Non-legal carriage return
|
||||||
|
"/[\n\t]+/", // Newlines and tabs
|
||||||
|
'/<head[^>]*>.*?<\/head>/i', // <head>
|
||||||
|
'/<script[^>]*>.*?<\/script>/i', // <script>s -- which strip_tags supposedly has problems with
|
||||||
|
'/<style[^>]*>.*?<\/style>/i', // <style>s -- which strip_tags supposedly has problems with
|
||||||
|
'/<p[^>]*>/i', // <P>
|
||||||
|
'/<br[^>]*>/i', // <br>
|
||||||
|
'/<i[^>]*>(.*?)<\/i>/i', // <i>
|
||||||
|
'/<em[^>]*>(.*?)<\/em>/i', // <em>
|
||||||
|
'/(<ul[^>]*>|<\/ul>)/i', // <ul> and </ul>
|
||||||
|
'/(<ol[^>]*>|<\/ol>)/i', // <ol> and </ol>
|
||||||
|
'/<li[^>]*>(.*?)<\/li>/i', // <li> and </li>
|
||||||
|
'/<li[^>]*>/i', // <li>
|
||||||
|
'/<hr[^>]*>/i', // <hr>
|
||||||
|
'/<div[^>]*>/i', // <div>
|
||||||
|
'/(<table[^>]*>|<\/table>)/i', // <table> and </table>
|
||||||
|
'/(<tr[^>]*>|<\/tr>)/i', // <tr> and </tr>
|
||||||
|
'/<td[^>]*>(.*?)<\/td>/i', // <td> and </td>
|
||||||
|
'/<span class="_html2text_ignore">.+?<\/span>/i' // <span class="_html2text_ignore">...</span>
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of pattern replacements corresponding to patterns searched.
|
||||||
|
*
|
||||||
|
* @var array $replace
|
||||||
|
* @access public
|
||||||
|
* @see $search
|
||||||
|
*/
|
||||||
|
public $replace = array(
|
||||||
|
'', // Non-legal carriage return
|
||||||
|
' ', // Newlines and tabs
|
||||||
|
'', // <head>
|
||||||
|
'', // <script>s -- which strip_tags supposedly has problems with
|
||||||
|
'', // <style>s -- which strip_tags supposedly has problems with
|
||||||
|
"\n\n", // <P>
|
||||||
|
"\n", // <br>
|
||||||
|
'_\\1_', // <i>
|
||||||
|
'_\\1_', // <em>
|
||||||
|
"\n\n", // <ul> and </ul>
|
||||||
|
"\n\n", // <ol> and </ol>
|
||||||
|
"\t* \\1\n", // <li> and </li>
|
||||||
|
"\n\t* ", // <li>
|
||||||
|
"\n-------------------------\n", // <hr>
|
||||||
|
"<div>\n", // <div>
|
||||||
|
"\n\n", // <table> and </table>
|
||||||
|
"\n", // <tr> and </tr>
|
||||||
|
"\t\t\\1\n", // <td> and </td>
|
||||||
|
"" // <span class="_html2text_ignore">...</span>
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of preg* regular expression patterns to search for,
|
||||||
|
* used in conjunction with $ent_replace.
|
||||||
|
*
|
||||||
|
* @var array $ent_search
|
||||||
|
* @access public
|
||||||
|
* @see $ent_replace
|
||||||
|
*/
|
||||||
|
public $ent_search = array(
|
||||||
|
'/&(nbsp|#160);/i', // Non-breaking space
|
||||||
|
'/&(quot|rdquo|ldquo|#8220|#8221|#147|#148);/i',
|
||||||
|
// Double quotes
|
||||||
|
'/&(apos|rsquo|lsquo|#8216|#8217);/i', // Single quotes
|
||||||
|
'/>/i', // Greater-than
|
||||||
|
'/</i', // Less-than
|
||||||
|
'/&(copy|#169);/i', // Copyright
|
||||||
|
'/&(trade|#8482|#153);/i', // Trademark
|
||||||
|
'/&(reg|#174);/i', // Registered
|
||||||
|
'/&(mdash|#151|#8212);/i', // mdash
|
||||||
|
'/&(ndash|minus|#8211|#8722);/i', // ndash
|
||||||
|
'/&(bull|#149|#8226);/i', // Bullet
|
||||||
|
'/&(pound|#163);/i', // Pound sign
|
||||||
|
'/&(euro|#8364);/i', // Euro sign
|
||||||
|
'/&(amp|#38);/i', // Ampersand: see _converter()
|
||||||
|
'/[ ]{2,}/', // Runs of spaces, post-handling
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of pattern replacements corresponding to patterns searched.
|
||||||
|
*
|
||||||
|
* @var array $ent_replace
|
||||||
|
* @access public
|
||||||
|
* @see $ent_search
|
||||||
|
*/
|
||||||
|
public $ent_replace = array(
|
||||||
|
' ', // Non-breaking space
|
||||||
|
'"', // Double quotes
|
||||||
|
"'", // Single quotes
|
||||||
|
'>',
|
||||||
|
'<',
|
||||||
|
'(c)',
|
||||||
|
'(tm)',
|
||||||
|
'(R)',
|
||||||
|
'--',
|
||||||
|
'-',
|
||||||
|
'*',
|
||||||
|
'£',
|
||||||
|
'EUR', // Euro sign. € ?
|
||||||
|
'|+|amp|+|', // Ampersand: see _converter()
|
||||||
|
' ', // Runs of spaces, post-handling
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of preg* regular expression patterns to search for
|
||||||
|
* and replace using callback function.
|
||||||
|
*
|
||||||
|
* @var array $callback_search
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
public $callback_search = array(
|
||||||
|
'/<(a) [^>]*href=("|\')([^"\']+)\2([^>]*)>(.*?)<\/a>/i', // <a href="">
|
||||||
|
'/<(h)[123456]( [^>]*)?>(.*?)<\/h[123456]>/i', // h1 - h6
|
||||||
|
'/<(b)( [^>]*)?>(.*?)<\/b>/i', // <b>
|
||||||
|
'/<(strong)( [^>]*)?>(.*?)<\/strong>/i', // <strong>
|
||||||
|
'/<(th)( [^>]*)?>(.*?)<\/th>/i', // <th> and </th>
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of preg* regular expression patterns to search for in PRE body,
|
||||||
|
* used in conjunction with $pre_replace.
|
||||||
|
*
|
||||||
|
* @var array $pre_search
|
||||||
|
* @access public
|
||||||
|
* @see $pre_replace
|
||||||
|
*/
|
||||||
|
public $pre_search = array(
|
||||||
|
"/\n/",
|
||||||
|
"/\t/",
|
||||||
|
'/ /',
|
||||||
|
'/<pre[^>]*>/',
|
||||||
|
'/<\/pre>/'
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of pattern replacements corresponding to patterns searched for PRE body.
|
||||||
|
*
|
||||||
|
* @var array $pre_replace
|
||||||
|
* @access public
|
||||||
|
* @see $pre_search
|
||||||
|
*/
|
||||||
|
public $pre_replace = array(
|
||||||
|
'<br>',
|
||||||
|
' ',
|
||||||
|
' ',
|
||||||
|
'',
|
||||||
|
''
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains a list of HTML tags to allow in the resulting text.
|
||||||
|
*
|
||||||
|
* @var string $allowed_tags
|
||||||
|
* @access public
|
||||||
|
* @see set_allowed_tags()
|
||||||
|
*/
|
||||||
|
public $allowed_tags = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains the base URL that relative links should resolve to.
|
||||||
|
*
|
||||||
|
* @var string $url
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
public $url;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates whether content in the $html variable has been converted yet.
|
||||||
|
*
|
||||||
|
* @var boolean $_converted
|
||||||
|
* @access private
|
||||||
|
* @see $html, $text
|
||||||
|
*/
|
||||||
|
private $_converted = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains URL addresses from links to be rendered in plain text.
|
||||||
|
*
|
||||||
|
* @var array $_link_list
|
||||||
|
* @access private
|
||||||
|
* @see _build_link_list()
|
||||||
|
*/
|
||||||
|
private $_link_list = array();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Various configuration options (able to be set in the constructor)
|
||||||
|
*
|
||||||
|
* @var array $_options
|
||||||
|
* @access private
|
||||||
|
*/
|
||||||
|
private $_options = array(
|
||||||
|
|
||||||
|
// 'none'
|
||||||
|
// 'inline' (show links inline)
|
||||||
|
// 'nextline' (show links on the next line)
|
||||||
|
// 'table' (if a table of link URLs should be listed after the text.
|
||||||
|
'do_links' => 'inline',
|
||||||
|
|
||||||
|
// Maximum width of the formatted text, in columns.
|
||||||
|
// Set this value to 0 (or less) to ignore word wrapping
|
||||||
|
// and not constrain text to a fixed-width column.
|
||||||
|
'width' => 70,
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* If the HTML source string (or file) is supplied, the class
|
||||||
|
* will instantiate with that source propagated, all that has
|
||||||
|
* to be done it to call get_text().
|
||||||
|
*
|
||||||
|
* @param string $source HTML content
|
||||||
|
* @param boolean $from_file Indicates $source is a file to pull content from
|
||||||
|
* @param array $options Set configuration options
|
||||||
|
* @access public
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct( $source = '', $from_file = false, $options = array() )
|
||||||
|
{
|
||||||
|
$this->_options = array_merge($this->_options, $options);
|
||||||
|
|
||||||
|
if ( !empty($source) ) {
|
||||||
|
$this->set_html($source, $from_file);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->set_base_url();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loads source HTML into memory, either from $source string or a file.
|
||||||
|
*
|
||||||
|
* @param string $source HTML content
|
||||||
|
* @param boolean $from_file Indicates $source is a file to pull content from
|
||||||
|
* @access public
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function set_html( $source, $from_file = false )
|
||||||
|
{
|
||||||
|
if ( $from_file && file_exists($source) ) {
|
||||||
|
$this->html = file_get_contents($source);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$this->html = $source;
|
||||||
|
|
||||||
|
$this->_converted = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the text, converted from HTML.
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function get_text()
|
||||||
|
{
|
||||||
|
if ( !$this->_converted ) {
|
||||||
|
$this->_convert();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->text;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prints the text, converted from HTML.
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function print_text()
|
||||||
|
{
|
||||||
|
print $this->get_text();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Alias to print_text(), operates identically.
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @return void
|
||||||
|
* @see print_text()
|
||||||
|
*/
|
||||||
|
public function p()
|
||||||
|
{
|
||||||
|
print $this->get_text();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the allowed HTML tags to pass through to the resulting text.
|
||||||
|
*
|
||||||
|
* Tags should be in the form "<p>", with no corresponding closing tag.
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function set_allowed_tags( $allowed_tags = '' )
|
||||||
|
{
|
||||||
|
if ( !empty($allowed_tags) ) {
|
||||||
|
$this->allowed_tags = $allowed_tags;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets a base URL to handle relative links.
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function set_base_url( $url = '' )
|
||||||
|
{
|
||||||
|
if ( empty($url) ) {
|
||||||
|
if ( !empty($_SERVER['HTTP_HOST']) ) {
|
||||||
|
$this->url = 'http://' . $_SERVER['HTTP_HOST'];
|
||||||
|
} else {
|
||||||
|
$this->url = '';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Strip any trailing slashes for consistency (relative
|
||||||
|
// URLs may already start with a slash like "/file.html")
|
||||||
|
if ( substr($url, -1) == '/' ) {
|
||||||
|
$url = substr($url, 0, -1);
|
||||||
|
}
|
||||||
|
$this->url = $url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Workhorse function that does actual conversion (calls _converter() method).
|
||||||
|
*
|
||||||
|
* @access private
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
private function _convert()
|
||||||
|
{
|
||||||
|
// Variables used for building the link list
|
||||||
|
$this->_link_list = array();
|
||||||
|
|
||||||
|
$text = trim(stripslashes($this->html));
|
||||||
|
|
||||||
|
// Convert HTML to TXT
|
||||||
|
$this->_converter($text);
|
||||||
|
|
||||||
|
// Add link list
|
||||||
|
if (!empty($this->_link_list)) {
|
||||||
|
$text .= "\n\nLinks:\n------\n";
|
||||||
|
foreach ($this->_link_list as $idx => $url) {
|
||||||
|
$text .= '[' . ($idx+1) . '] ' . $url . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->text = $text;
|
||||||
|
|
||||||
|
$this->_converted = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Workhorse function that does actual conversion.
|
||||||
|
*
|
||||||
|
* First performs custom tag replacement specified by $search and
|
||||||
|
* $replace arrays. Then strips any remaining HTML tags, reduces whitespace
|
||||||
|
* and newlines to a readable format, and word wraps the text to
|
||||||
|
* $this->_options['width'] characters.
|
||||||
|
*
|
||||||
|
* @param string Reference to HTML content string
|
||||||
|
*
|
||||||
|
* @access private
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
private function _converter(&$text)
|
||||||
|
{
|
||||||
|
// Convert <BLOCKQUOTE> (before PRE!)
|
||||||
|
$this->_convert_blockquotes($text);
|
||||||
|
|
||||||
|
// Convert <PRE>
|
||||||
|
$this->_convert_pre($text);
|
||||||
|
|
||||||
|
// Run our defined tags search-and-replace
|
||||||
|
$text = preg_replace($this->search, $this->replace, $text);
|
||||||
|
|
||||||
|
// Run our defined tags search-and-replace with callback
|
||||||
|
$text = preg_replace_callback($this->callback_search, array($this, '_preg_callback'), $text);
|
||||||
|
|
||||||
|
// Strip any other HTML tags
|
||||||
|
$text = strip_tags($text, $this->allowed_tags);
|
||||||
|
|
||||||
|
// Run our defined entities/characters search-and-replace
|
||||||
|
$text = preg_replace($this->ent_search, $this->ent_replace, $text);
|
||||||
|
|
||||||
|
// Replace known html entities
|
||||||
|
$text = html_entity_decode($text, ENT_QUOTES);
|
||||||
|
|
||||||
|
// Remove unknown/unhandled entities (this cannot be done in search-and-replace block)
|
||||||
|
$text = preg_replace('/&([a-zA-Z0-9]{2,6}|#[0-9]{2,4});/', '', $text);
|
||||||
|
|
||||||
|
// Convert "|+|amp|+|" into "&", need to be done after handling of unknown entities
|
||||||
|
// This properly handles situation of "&quot;" in input string
|
||||||
|
$text = str_replace('|+|amp|+|', '&', $text);
|
||||||
|
|
||||||
|
// Bring down number of empty lines to 2 max
|
||||||
|
$text = preg_replace("/\n\s+\n/", "\n\n", $text);
|
||||||
|
$text = preg_replace("/[\n]{3,}/", "\n\n", $text);
|
||||||
|
|
||||||
|
// remove leading empty lines (can be produced by eg. P tag on the beginning)
|
||||||
|
$text = ltrim($text, "\n");
|
||||||
|
|
||||||
|
// Wrap the text to a readable format
|
||||||
|
// for PHP versions >= 4.0.2. Default width is 75
|
||||||
|
// If width is 0 or less, don't wrap the text.
|
||||||
|
if ( $this->_options['width'] > 0 ) {
|
||||||
|
$text = wordwrap($text, $this->_options['width']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper function called by preg_replace() on link replacement.
|
||||||
|
*
|
||||||
|
* Maintains an internal list of links to be displayed at the end of the
|
||||||
|
* text, with numeric indices to the original point in the text they
|
||||||
|
* appeared. Also makes an effort at identifying and handling absolute
|
||||||
|
* and relative links.
|
||||||
|
*
|
||||||
|
* @param string $link URL of the link
|
||||||
|
* @param string $display Part of the text to associate number with
|
||||||
|
* @access private
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private function _build_link_list( $link, $display, $link_override = null)
|
||||||
|
{
|
||||||
|
$link_method = ($link_override) ? $link_override : $this->_options['do_links'];
|
||||||
|
if ($link_method == 'none')
|
||||||
|
return $display;
|
||||||
|
|
||||||
|
|
||||||
|
// Ignored link types
|
||||||
|
if (preg_match('!^(javascript:|mailto:|#)!i', $link)) {
|
||||||
|
return $display;
|
||||||
|
}
|
||||||
|
if (preg_match('!^([a-z][a-z0-9.+-]+:)!i', $link)) {
|
||||||
|
$url = $link;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$url = $this->url;
|
||||||
|
if (substr($link, 0, 1) != '/') {
|
||||||
|
$url .= '/';
|
||||||
|
}
|
||||||
|
$url .= "$link";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($link_method == 'table')
|
||||||
|
{
|
||||||
|
if (($index = array_search($url, $this->_link_list)) === false) {
|
||||||
|
$index = count($this->_link_list);
|
||||||
|
$this->_link_list[] = $url;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $display . ' [' . ($index+1) . ']';
|
||||||
|
}
|
||||||
|
elseif ($link_method == 'nextline')
|
||||||
|
{
|
||||||
|
return $display . "\n[" . $url . ']';
|
||||||
|
}
|
||||||
|
else // link_method defaults to inline
|
||||||
|
{
|
||||||
|
return $display . ' [' . $url . ']';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper function for PRE body conversion.
|
||||||
|
*
|
||||||
|
* @param string HTML content
|
||||||
|
* @access private
|
||||||
|
*/
|
||||||
|
private function _convert_pre(&$text)
|
||||||
|
{
|
||||||
|
// get the content of PRE element
|
||||||
|
while (preg_match('/<pre[^>]*>(.*)<\/pre>/ismU', $text, $matches)) {
|
||||||
|
$this->pre_content = $matches[1];
|
||||||
|
|
||||||
|
// Run our defined tags search-and-replace with callback
|
||||||
|
$this->pre_content = preg_replace_callback($this->callback_search,
|
||||||
|
array($this, '_preg_callback'), $this->pre_content);
|
||||||
|
|
||||||
|
// convert the content
|
||||||
|
$this->pre_content = sprintf('<div><br>%s<br></div>',
|
||||||
|
preg_replace($this->pre_search, $this->pre_replace, $this->pre_content));
|
||||||
|
// replace the content (use callback because content can contain $0 variable)
|
||||||
|
$text = preg_replace_callback('/<pre[^>]*>.*<\/pre>/ismU',
|
||||||
|
array($this, '_preg_pre_callback'), $text, 1);
|
||||||
|
|
||||||
|
// free memory
|
||||||
|
$this->pre_content = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper function for BLOCKQUOTE body conversion.
|
||||||
|
*
|
||||||
|
* @param string HTML content
|
||||||
|
* @access private
|
||||||
|
*/
|
||||||
|
private function _convert_blockquotes(&$text)
|
||||||
|
{
|
||||||
|
if (preg_match_all('/<\/*blockquote[^>]*>/i', $text, $matches, PREG_OFFSET_CAPTURE)) {
|
||||||
|
$level = 0;
|
||||||
|
$diff = 0;
|
||||||
|
$start = 0;
|
||||||
|
$taglen = 0;
|
||||||
|
foreach ($matches[0] as $m) {
|
||||||
|
if ($m[0][0] == '<' && $m[0][1] == '/') {
|
||||||
|
$level--;
|
||||||
|
if ($level < 0) {
|
||||||
|
$level = 0; // malformed HTML: go to next blockquote
|
||||||
|
}
|
||||||
|
else if ($level > 0) {
|
||||||
|
// skip inner blockquote
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$end = $m[1];
|
||||||
|
$len = $end - $taglen - $start;
|
||||||
|
// Get blockquote content
|
||||||
|
$body = substr($text, $start + $taglen - $diff, $len);
|
||||||
|
|
||||||
|
// Set text width
|
||||||
|
$p_width = $this->_options['width'];
|
||||||
|
if ($this->_options['width'] > 0) $this->_options['width'] -= 2;
|
||||||
|
// Convert blockquote content
|
||||||
|
$body = trim($body);
|
||||||
|
$this->_converter($body);
|
||||||
|
// Add citation markers and create PRE block
|
||||||
|
$body = preg_replace('/((^|\n)>*)/', '\\1> ', trim($body));
|
||||||
|
$body = '<pre>' . htmlspecialchars($body) . '</pre>';
|
||||||
|
// Re-set text width
|
||||||
|
$this->_options['width'] = $p_width;
|
||||||
|
// Replace content
|
||||||
|
$text = substr($text, 0, $start - $diff)
|
||||||
|
. $body . substr($text, $end + strlen($m[0]) - $diff);
|
||||||
|
|
||||||
|
$diff = $len + $taglen + strlen($m[0]) - strlen($body);
|
||||||
|
unset($body);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if ($level == 0) {
|
||||||
|
$start = $m[1];
|
||||||
|
$taglen = strlen($m[0]);
|
||||||
|
}
|
||||||
|
$level ++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback function for preg_replace_callback use.
|
||||||
|
*
|
||||||
|
* @param array PREG matches
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private function _preg_callback($matches)
|
||||||
|
{
|
||||||
|
switch (strtolower($matches[1])) {
|
||||||
|
case 'b':
|
||||||
|
case 'strong':
|
||||||
|
return $this->_toupper($matches[3]);
|
||||||
|
case 'th':
|
||||||
|
return $this->_toupper("\t\t". $matches[3] ."\n");
|
||||||
|
case 'h':
|
||||||
|
return $this->_toupper("\n\n". $matches[3] ."\n\n");
|
||||||
|
case 'a':
|
||||||
|
// override the link method
|
||||||
|
$link_override = null;
|
||||||
|
if (preg_match("/_html2text_link_(\w+)/", $matches[4], $link_override_match))
|
||||||
|
{
|
||||||
|
$link_override = $link_override_match[1];
|
||||||
|
}
|
||||||
|
// Remove spaces in URL (#1487805)
|
||||||
|
$url = str_replace(' ', '', $matches[3]);
|
||||||
|
return $this->_build_link_list($url, $matches[5], $link_override);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback function for preg_replace_callback use in PRE content handler.
|
||||||
|
*
|
||||||
|
* @param array PREG matches
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private function _preg_pre_callback($matches)
|
||||||
|
{
|
||||||
|
return $this->pre_content;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Strtoupper function with HTML tags and entities handling.
|
||||||
|
*
|
||||||
|
* @param string $str Text to convert
|
||||||
|
* @return string Converted text
|
||||||
|
*/
|
||||||
|
private function _toupper($str)
|
||||||
|
{
|
||||||
|
// string can containg HTML tags
|
||||||
|
$chunks = preg_split('/(<[^>]*>)/', $str, null, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
|
||||||
|
|
||||||
|
// convert toupper only the text between HTML tags
|
||||||
|
foreach ($chunks as $idx => $chunk) {
|
||||||
|
if ($chunk[0] != '<') {
|
||||||
|
$chunks[$idx] = $this->_strtoupper($chunk);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return implode($chunks);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Strtoupper multibyte wrapper function with HTML entities handling.
|
||||||
|
*
|
||||||
|
* @param string $str Text to convert
|
||||||
|
* @return string Converted text
|
||||||
|
*/
|
||||||
|
private function _strtoupper($str)
|
||||||
|
{
|
||||||
|
$str = html_entity_decode($str, ENT_COMPAT);
|
||||||
|
|
||||||
|
if (function_exists('mb_strtoupper'))
|
||||||
|
$str = mb_strtoupper($str);
|
||||||
|
else
|
||||||
|
$str = strtoupper($str);
|
||||||
|
|
||||||
|
$str = htmlspecialchars($str, ENT_COMPAT);
|
||||||
|
|
||||||
|
return $str;
|
||||||
|
}
|
||||||
|
}
|
||||||
861
phpmailer/extras/htmlfilter.php
Normal file
861
phpmailer/extras/htmlfilter.php
Normal file
@@ -0,0 +1,861 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* htmlfilter.inc
|
||||||
|
* ---------------
|
||||||
|
* This set of functions allows you to filter html in order to remove
|
||||||
|
* any malicious tags from it. Useful in cases when you need to filter
|
||||||
|
* user input for any cross-site-scripting attempts.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2002-2004 by Duke University
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||||
|
* 02110-1301 USA
|
||||||
|
*
|
||||||
|
* @Author Konstantin Riabitsev <icon@linux.duke.edu>
|
||||||
|
* @Version 1.1 ($Date: 2011-07-04 14:02:23 -0400 (Mon, 04 Jul 2011) $)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author Jim Jagielski <jim@jaguNET.com / jimjag@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function returns the final tag out of the tag name, an array
|
||||||
|
* of attributes, and the type of the tag. This function is called by
|
||||||
|
* tln_sanitize internally.
|
||||||
|
*
|
||||||
|
* @param $tagname the name of the tag.
|
||||||
|
* @param $attary the array of attributes and their values
|
||||||
|
* @param $tagtype The type of the tag (see in comments).
|
||||||
|
* @return a string with the final tag representation.
|
||||||
|
*/
|
||||||
|
function tln_tagprint($tagname, $attary, $tagtype){
|
||||||
|
$me = 'tln_tagprint';
|
||||||
|
if ($tagtype == 2){
|
||||||
|
$fulltag = '</' . $tagname . '>';
|
||||||
|
} else {
|
||||||
|
$fulltag = '<' . $tagname;
|
||||||
|
if (is_array($attary) && sizeof($attary)){
|
||||||
|
$atts = Array();
|
||||||
|
while (list($attname, $attvalue) = each($attary)){
|
||||||
|
array_push($atts, "$attname=$attvalue");
|
||||||
|
}
|
||||||
|
$fulltag .= ' ' . join(' ', $atts);
|
||||||
|
}
|
||||||
|
if ($tagtype == 3){
|
||||||
|
$fulltag .= ' /';
|
||||||
|
}
|
||||||
|
$fulltag .= '>';
|
||||||
|
}
|
||||||
|
return $fulltag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A small helper function to use with array_walk. Modifies a by-ref
|
||||||
|
* value and makes it lowercase.
|
||||||
|
*
|
||||||
|
* @param $val a value passed by-ref.
|
||||||
|
* @return void since it modifies a by-ref value.
|
||||||
|
*/
|
||||||
|
function tln_casenormalize(&$val){
|
||||||
|
$val = strtolower($val);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function skips any whitespace from the current position within
|
||||||
|
* a string and to the next non-whitespace value.
|
||||||
|
*
|
||||||
|
* @param $body the string
|
||||||
|
* @param $offset the offset within the string where we should start
|
||||||
|
* looking for the next non-whitespace character.
|
||||||
|
* @return the location within the $body where the next
|
||||||
|
* non-whitespace char is located.
|
||||||
|
*/
|
||||||
|
function tln_skipspace($body, $offset){
|
||||||
|
$me = 'tln_skipspace';
|
||||||
|
preg_match('/^(\s*)/s', substr($body, $offset), $matches);
|
||||||
|
if (sizeof($matches[1])){
|
||||||
|
$count = strlen($matches[1]);
|
||||||
|
$offset += $count;
|
||||||
|
}
|
||||||
|
return $offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function looks for the next character within a string. It's
|
||||||
|
* really just a glorified "strpos", except it catches the failures
|
||||||
|
* nicely.
|
||||||
|
*
|
||||||
|
* @param $body The string to look for needle in.
|
||||||
|
* @param $offset Start looking from this position.
|
||||||
|
* @param $needle The character/string to look for.
|
||||||
|
* @return location of the next occurance of the needle, or
|
||||||
|
* strlen($body) if needle wasn't found.
|
||||||
|
*/
|
||||||
|
function tln_findnxstr($body, $offset, $needle){
|
||||||
|
$me = 'tln_findnxstr';
|
||||||
|
$pos = strpos($body, $needle, $offset);
|
||||||
|
if ($pos === FALSE){
|
||||||
|
$pos = strlen($body);
|
||||||
|
}
|
||||||
|
return $pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function takes a PCRE-style regexp and tries to match it
|
||||||
|
* within the string.
|
||||||
|
*
|
||||||
|
* @param $body The string to look for needle in.
|
||||||
|
* @param $offset Start looking from here.
|
||||||
|
* @param $reg A PCRE-style regex to match.
|
||||||
|
* @return Returns a false if no matches found, or an array
|
||||||
|
* with the following members:
|
||||||
|
* - integer with the location of the match within $body
|
||||||
|
* - string with whatever content between offset and the match
|
||||||
|
* - string with whatever it is we matched
|
||||||
|
*/
|
||||||
|
function tln_findnxreg($body, $offset, $reg){
|
||||||
|
$me = 'tln_findnxreg';
|
||||||
|
$matches = Array();
|
||||||
|
$retarr = Array();
|
||||||
|
$preg_rule = '%^(.*?)(' . $reg . ')%s';
|
||||||
|
preg_match($preg_rule, substr($body, $offset), $matches);
|
||||||
|
if (!isset($matches[0])){
|
||||||
|
$retarr = false;
|
||||||
|
} else {
|
||||||
|
$retarr[0] = $offset + strlen($matches[1]);
|
||||||
|
$retarr[1] = $matches[1];
|
||||||
|
$retarr[2] = $matches[2];
|
||||||
|
}
|
||||||
|
return $retarr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function looks for the next tag.
|
||||||
|
*
|
||||||
|
* @param $body String where to look for the next tag.
|
||||||
|
* @param $offset Start looking from here.
|
||||||
|
* @return false if no more tags exist in the body, or
|
||||||
|
* an array with the following members:
|
||||||
|
* - string with the name of the tag
|
||||||
|
* - array with attributes and their values
|
||||||
|
* - integer with tag type (1, 2, or 3)
|
||||||
|
* - integer where the tag starts (starting "<")
|
||||||
|
* - integer where the tag ends (ending ">")
|
||||||
|
* first three members will be false, if the tag is invalid.
|
||||||
|
*/
|
||||||
|
function tln_getnxtag($body, $offset){
|
||||||
|
$me = 'tln_getnxtag';
|
||||||
|
if ($offset > strlen($body)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$lt = tln_findnxstr($body, $offset, '<');
|
||||||
|
if ($lt == strlen($body)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* We are here:
|
||||||
|
* blah blah <tag attribute="value">
|
||||||
|
* \---------^
|
||||||
|
*/
|
||||||
|
$pos = tln_skipspace($body, $lt + 1);
|
||||||
|
if ($pos >= strlen($body)){
|
||||||
|
return Array(false, false, false, $lt, strlen($body));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* There are 3 kinds of tags:
|
||||||
|
* 1. Opening tag, e.g.:
|
||||||
|
* <a href="blah">
|
||||||
|
* 2. Closing tag, e.g.:
|
||||||
|
* </a>
|
||||||
|
* 3. XHTML-style content-less tag, e.g.:
|
||||||
|
* <img src="blah"/>
|
||||||
|
*/
|
||||||
|
$tagtype = false;
|
||||||
|
switch (substr($body, $pos, 1)){
|
||||||
|
case '/':
|
||||||
|
$tagtype = 2;
|
||||||
|
$pos++;
|
||||||
|
break;
|
||||||
|
case '!':
|
||||||
|
/**
|
||||||
|
* A comment or an SGML declaration.
|
||||||
|
*/
|
||||||
|
if (substr($body, $pos+1, 2) == '--'){
|
||||||
|
$gt = strpos($body, '-->', $pos);
|
||||||
|
if ($gt === false){
|
||||||
|
$gt = strlen($body);
|
||||||
|
} else {
|
||||||
|
$gt += 2;
|
||||||
|
}
|
||||||
|
return Array(false, false, false, $lt, $gt);
|
||||||
|
} else {
|
||||||
|
$gt = tln_findnxstr($body, $pos, '>');
|
||||||
|
return Array(false, false, false, $lt, $gt);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
/**
|
||||||
|
* Assume tagtype 1 for now. If it's type 3, we'll switch values
|
||||||
|
* later.
|
||||||
|
*/
|
||||||
|
$tagtype = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$tag_start = $pos;
|
||||||
|
$tagname = '';
|
||||||
|
/**
|
||||||
|
* Look for next [\W-_], which will indicate the end of the tag name.
|
||||||
|
*/
|
||||||
|
$regary = tln_findnxreg($body, $pos, '[^\w\-_]');
|
||||||
|
if ($regary == false){
|
||||||
|
return Array(false, false, false, $lt, strlen($body));
|
||||||
|
}
|
||||||
|
list($pos, $tagname, $match) = $regary;
|
||||||
|
$tagname = strtolower($tagname);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* $match can be either of these:
|
||||||
|
* '>' indicating the end of the tag entirely.
|
||||||
|
* '\s' indicating the end of the tag name.
|
||||||
|
* '/' indicating that this is type-3 xhtml tag.
|
||||||
|
*
|
||||||
|
* Whatever else we find there indicates an invalid tag.
|
||||||
|
*/
|
||||||
|
switch ($match){
|
||||||
|
case '/':
|
||||||
|
/**
|
||||||
|
* This is an xhtml-style tag with a closing / at the
|
||||||
|
* end, like so: <img src="blah"/>. Check if it's followed
|
||||||
|
* by the closing bracket. If not, then this tag is invalid
|
||||||
|
*/
|
||||||
|
if (substr($body, $pos, 2) == '/>'){
|
||||||
|
$pos++;
|
||||||
|
$tagtype = 3;
|
||||||
|
} else {
|
||||||
|
$gt = tln_findnxstr($body, $pos, '>');
|
||||||
|
$retary = Array(false, false, false, $lt, $gt);
|
||||||
|
return $retary;
|
||||||
|
}
|
||||||
|
case '>':
|
||||||
|
return Array($tagname, false, $tagtype, $lt, $pos);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
/**
|
||||||
|
* Check if it's whitespace
|
||||||
|
*/
|
||||||
|
if (preg_match('/\s/', $match)){
|
||||||
|
} else {
|
||||||
|
/**
|
||||||
|
* This is an invalid tag! Look for the next closing ">".
|
||||||
|
*/
|
||||||
|
$gt = tln_findnxstr($body, $lt, '>');
|
||||||
|
return Array(false, false, false, $lt, $gt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* At this point we're here:
|
||||||
|
* <tagname attribute='blah'>
|
||||||
|
* \-------^
|
||||||
|
*
|
||||||
|
* At this point we loop in order to find all attributes.
|
||||||
|
*/
|
||||||
|
$attname = '';
|
||||||
|
$atttype = false;
|
||||||
|
$attary = Array();
|
||||||
|
|
||||||
|
while ($pos <= strlen($body)){
|
||||||
|
$pos = tln_skipspace($body, $pos);
|
||||||
|
if ($pos == strlen($body)){
|
||||||
|
/**
|
||||||
|
* Non-closed tag.
|
||||||
|
*/
|
||||||
|
return Array(false, false, false, $lt, $pos);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* See if we arrived at a ">" or "/>", which means that we reached
|
||||||
|
* the end of the tag.
|
||||||
|
*/
|
||||||
|
$matches = Array();
|
||||||
|
preg_match('%^(\s*)(>|/>)%s', substr($body, $pos), $matches);
|
||||||
|
if (isset($matches[0]) && $matches[0]){
|
||||||
|
/**
|
||||||
|
* Yep. So we did.
|
||||||
|
*/
|
||||||
|
$pos += strlen($matches[1]);
|
||||||
|
if ($matches[2] == '/>'){
|
||||||
|
$tagtype = 3;
|
||||||
|
$pos++;
|
||||||
|
}
|
||||||
|
return Array($tagname, $attary, $tagtype, $lt, $pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* There are several types of attributes, with optional
|
||||||
|
* [:space:] between members.
|
||||||
|
* Type 1:
|
||||||
|
* attrname[:space:]=[:space:]'CDATA'
|
||||||
|
* Type 2:
|
||||||
|
* attrname[:space:]=[:space:]"CDATA"
|
||||||
|
* Type 3:
|
||||||
|
* attr[:space:]=[:space:]CDATA
|
||||||
|
* Type 4:
|
||||||
|
* attrname
|
||||||
|
*
|
||||||
|
* We leave types 1 and 2 the same, type 3 we check for
|
||||||
|
* '"' and convert to """ if needed, then wrap in
|
||||||
|
* double quotes. Type 4 we convert into:
|
||||||
|
* attrname="yes".
|
||||||
|
*/
|
||||||
|
$regary = tln_findnxreg($body, $pos, '[^\w\-_]');
|
||||||
|
if ($regary == false){
|
||||||
|
/**
|
||||||
|
* Looks like body ended before the end of tag.
|
||||||
|
*/
|
||||||
|
return Array(false, false, false, $lt, strlen($body));
|
||||||
|
}
|
||||||
|
list($pos, $attname, $match) = $regary;
|
||||||
|
$attname = strtolower($attname);
|
||||||
|
/**
|
||||||
|
* We arrived at the end of attribute name. Several things possible
|
||||||
|
* here:
|
||||||
|
* '>' means the end of the tag and this is attribute type 4
|
||||||
|
* '/' if followed by '>' means the same thing as above
|
||||||
|
* '\s' means a lot of things -- look what it's followed by.
|
||||||
|
* anything else means the attribute is invalid.
|
||||||
|
*/
|
||||||
|
switch($match){
|
||||||
|
case '/':
|
||||||
|
/**
|
||||||
|
* This is an xhtml-style tag with a closing / at the
|
||||||
|
* end, like so: <img src="blah"/>. Check if it's followed
|
||||||
|
* by the closing bracket. If not, then this tag is invalid
|
||||||
|
*/
|
||||||
|
if (substr($body, $pos, 2) == '/>'){
|
||||||
|
$pos++;
|
||||||
|
$tagtype = 3;
|
||||||
|
} else {
|
||||||
|
$gt = tln_findnxstr($body, $pos, '>');
|
||||||
|
$retary = Array(false, false, false, $lt, $gt);
|
||||||
|
return $retary;
|
||||||
|
}
|
||||||
|
case '>':
|
||||||
|
$attary{$attname} = '"yes"';
|
||||||
|
return Array($tagname, $attary, $tagtype, $lt, $pos);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
/**
|
||||||
|
* Skip whitespace and see what we arrive at.
|
||||||
|
*/
|
||||||
|
$pos = tln_skipspace($body, $pos);
|
||||||
|
$char = substr($body, $pos, 1);
|
||||||
|
/**
|
||||||
|
* Two things are valid here:
|
||||||
|
* '=' means this is attribute type 1 2 or 3.
|
||||||
|
* \w means this was attribute type 4.
|
||||||
|
* anything else we ignore and re-loop. End of tag and
|
||||||
|
* invalid stuff will be caught by our checks at the beginning
|
||||||
|
* of the loop.
|
||||||
|
*/
|
||||||
|
if ($char == '='){
|
||||||
|
$pos++;
|
||||||
|
$pos = tln_skipspace($body, $pos);
|
||||||
|
/**
|
||||||
|
* Here are 3 possibilities:
|
||||||
|
* "'" attribute type 1
|
||||||
|
* '"' attribute type 2
|
||||||
|
* everything else is the content of tag type 3
|
||||||
|
*/
|
||||||
|
$quot = substr($body, $pos, 1);
|
||||||
|
if ($quot == '\''){
|
||||||
|
$regary = tln_findnxreg($body, $pos+1, '\'');
|
||||||
|
if ($regary == false){
|
||||||
|
return Array(false, false, false, $lt, strlen($body));
|
||||||
|
}
|
||||||
|
list($pos, $attval, $match) = $regary;
|
||||||
|
$pos++;
|
||||||
|
$attary{$attname} = '\'' . $attval . '\'';
|
||||||
|
} else if ($quot == '"'){
|
||||||
|
$regary = tln_findnxreg($body, $pos+1, '\"');
|
||||||
|
if ($regary == false){
|
||||||
|
return Array(false, false, false, $lt, strlen($body));
|
||||||
|
}
|
||||||
|
list($pos, $attval, $match) = $regary;
|
||||||
|
$pos++;
|
||||||
|
$attary{$attname} = '"' . $attval . '"';
|
||||||
|
} else {
|
||||||
|
/**
|
||||||
|
* These are hateful. Look for \s, or >.
|
||||||
|
*/
|
||||||
|
$regary = tln_findnxreg($body, $pos, '[\s>]');
|
||||||
|
if ($regary == false){
|
||||||
|
return Array(false, false, false, $lt, strlen($body));
|
||||||
|
}
|
||||||
|
list($pos, $attval, $match) = $regary;
|
||||||
|
/**
|
||||||
|
* If it's ">" it will be caught at the top.
|
||||||
|
*/
|
||||||
|
$attval = preg_replace('/\"/s', '"', $attval);
|
||||||
|
$attary{$attname} = '"' . $attval . '"';
|
||||||
|
}
|
||||||
|
} else if (preg_match('|[\w/>]|', $char)) {
|
||||||
|
/**
|
||||||
|
* That was attribute type 4.
|
||||||
|
*/
|
||||||
|
$attary{$attname} = '"yes"';
|
||||||
|
} else {
|
||||||
|
/**
|
||||||
|
* An illegal character. Find next '>' and return.
|
||||||
|
*/
|
||||||
|
$gt = tln_findnxstr($body, $pos, '>');
|
||||||
|
return Array(false, false, false, $lt, $gt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* The fact that we got here indicates that the tag end was never
|
||||||
|
* found. Return invalid tag indication so it gets stripped.
|
||||||
|
*/
|
||||||
|
return Array(false, false, false, $lt, strlen($body));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translates entities into literal values so they can be checked.
|
||||||
|
*
|
||||||
|
* @param $attvalue the by-ref value to check.
|
||||||
|
* @param $regex the regular expression to check against.
|
||||||
|
* @param $hex whether the entites are hexadecimal.
|
||||||
|
* @return True or False depending on whether there were matches.
|
||||||
|
*/
|
||||||
|
function tln_deent(&$attvalue, $regex, $hex=false){
|
||||||
|
$me = 'tln_deent';
|
||||||
|
$ret_match = false;
|
||||||
|
preg_match_all($regex, $attvalue, $matches);
|
||||||
|
if (is_array($matches) && sizeof($matches[0]) > 0){
|
||||||
|
$repl = Array();
|
||||||
|
for ($i = 0; $i < sizeof($matches[0]); $i++){
|
||||||
|
$numval = $matches[1][$i];
|
||||||
|
if ($hex){
|
||||||
|
$numval = hexdec($numval);
|
||||||
|
}
|
||||||
|
$repl{$matches[0][$i]} = chr($numval);
|
||||||
|
}
|
||||||
|
$attvalue = strtr($attvalue, $repl);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function checks attribute values for entity-encoded values
|
||||||
|
* and returns them translated into 8-bit strings so we can run
|
||||||
|
* checks on them.
|
||||||
|
*
|
||||||
|
* @param $attvalue A string to run entity check against.
|
||||||
|
* @return Nothing, modifies a reference value.
|
||||||
|
*/
|
||||||
|
function tln_defang(&$attvalue){
|
||||||
|
$me = 'tln_defang';
|
||||||
|
/**
|
||||||
|
* Skip this if there aren't ampersands or backslashes.
|
||||||
|
*/
|
||||||
|
if (strpos($attvalue, '&') === false
|
||||||
|
&& strpos($attvalue, '\\') === false){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$m = false;
|
||||||
|
do {
|
||||||
|
$m = false;
|
||||||
|
$m = $m || tln_deent($attvalue, '/\�*(\d+);*/s');
|
||||||
|
$m = $m || tln_deent($attvalue, '/\�*((\d|[a-f])+);*/si', true);
|
||||||
|
$m = $m || tln_deent($attvalue, '/\\\\(\d+)/s', true);
|
||||||
|
} while ($m == true);
|
||||||
|
$attvalue = stripslashes($attvalue);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Kill any tabs, newlines, or carriage returns. Our friends the
|
||||||
|
* makers of the browser with 95% market value decided that it'd
|
||||||
|
* be funny to make "java[tab]script" be just as good as "javascript".
|
||||||
|
*
|
||||||
|
* @param attvalue The attribute value before extraneous spaces removed.
|
||||||
|
* @return attvalue Nothing, modifies a reference value.
|
||||||
|
*/
|
||||||
|
function tln_unspace(&$attvalue){
|
||||||
|
$me = 'tln_unspace';
|
||||||
|
if (strcspn($attvalue, "\t\r\n\0 ") != strlen($attvalue)){
|
||||||
|
$attvalue = str_replace(Array("\t", "\r", "\n", "\0", " "),
|
||||||
|
Array('', '', '', '', ''), $attvalue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function runs various checks against the attributes.
|
||||||
|
*
|
||||||
|
* @param $tagname String with the name of the tag.
|
||||||
|
* @param $attary Array with all tag attributes.
|
||||||
|
* @param $rm_attnames See description for tln_sanitize
|
||||||
|
* @param $bad_attvals See description for tln_sanitize
|
||||||
|
* @param $add_attr_to_tag See description for tln_sanitize
|
||||||
|
* @return Array with modified attributes.
|
||||||
|
*/
|
||||||
|
function tln_fixatts($tagname,
|
||||||
|
$attary,
|
||||||
|
$rm_attnames,
|
||||||
|
$bad_attvals,
|
||||||
|
$add_attr_to_tag
|
||||||
|
){
|
||||||
|
$me = 'tln_fixatts';
|
||||||
|
while (list($attname, $attvalue) = each($attary)){
|
||||||
|
/**
|
||||||
|
* See if this attribute should be removed.
|
||||||
|
*/
|
||||||
|
foreach ($rm_attnames as $matchtag=>$matchattrs){
|
||||||
|
if (preg_match($matchtag, $tagname)){
|
||||||
|
foreach ($matchattrs as $matchattr){
|
||||||
|
if (preg_match($matchattr, $attname)){
|
||||||
|
unset($attary{$attname});
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Remove any backslashes, entities, or extraneous whitespace.
|
||||||
|
*/
|
||||||
|
tln_defang($attvalue);
|
||||||
|
tln_unspace($attvalue);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Now let's run checks on the attvalues.
|
||||||
|
* I don't expect anyone to comprehend this. If you do,
|
||||||
|
* get in touch with me so I can drive to where you live and
|
||||||
|
* shake your hand personally. :)
|
||||||
|
*/
|
||||||
|
foreach ($bad_attvals as $matchtag=>$matchattrs){
|
||||||
|
if (preg_match($matchtag, $tagname)){
|
||||||
|
foreach ($matchattrs as $matchattr=>$valary){
|
||||||
|
if (preg_match($matchattr, $attname)){
|
||||||
|
/**
|
||||||
|
* There are two arrays in valary.
|
||||||
|
* First is matches.
|
||||||
|
* Second one is replacements
|
||||||
|
*/
|
||||||
|
list($valmatch, $valrepl) = $valary;
|
||||||
|
$newvalue = preg_replace($valmatch,$valrepl,$attvalue);
|
||||||
|
if ($newvalue != $attvalue){
|
||||||
|
$attary{$attname} = $newvalue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* See if we need to append any attributes to this tag.
|
||||||
|
*/
|
||||||
|
foreach ($add_attr_to_tag as $matchtag=>$addattary){
|
||||||
|
if (preg_match($matchtag, $tagname)){
|
||||||
|
$attary = array_merge($attary, $addattary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $attary;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param $body the string with HTML you wish to filter
|
||||||
|
* @param $tag_list see description above
|
||||||
|
* @param $rm_tags_with_content see description above
|
||||||
|
* @param $self_closing_tags see description above
|
||||||
|
* @param $force_tag_closing see description above
|
||||||
|
* @param $rm_attnames see description above
|
||||||
|
* @param $bad_attvals see description above
|
||||||
|
* @param $add_attr_to_tag see description above
|
||||||
|
* @return tln_sanitized html safe to show on your pages.
|
||||||
|
*/
|
||||||
|
function tln_sanitize($body,
|
||||||
|
$tag_list,
|
||||||
|
$rm_tags_with_content,
|
||||||
|
$self_closing_tags,
|
||||||
|
$force_tag_closing,
|
||||||
|
$rm_attnames,
|
||||||
|
$bad_attvals,
|
||||||
|
$add_attr_to_tag
|
||||||
|
)
|
||||||
|
{
|
||||||
|
$me = 'tln_sanitize';
|
||||||
|
/**
|
||||||
|
* Normalize rm_tags and rm_tags_with_content.
|
||||||
|
*/
|
||||||
|
$rm_tags = array_shift($tag_list);
|
||||||
|
@array_walk($tag_list, 'tln_casenormalize');
|
||||||
|
@array_walk($rm_tags_with_content, 'tln_casenormalize');
|
||||||
|
@array_walk($self_closing_tags, 'tln_casenormalize');
|
||||||
|
/**
|
||||||
|
* See if tag_list is of tags to remove or tags to allow.
|
||||||
|
* false means remove these tags
|
||||||
|
* true means allow these tags
|
||||||
|
*/
|
||||||
|
$curpos = 0;
|
||||||
|
$open_tags = Array();
|
||||||
|
$trusted = "<!-- begin tln_sanitized html -->\n";
|
||||||
|
$skip_content = false;
|
||||||
|
/**
|
||||||
|
* Take care of netscape's stupid javascript entities like
|
||||||
|
* &{alert('boo')};
|
||||||
|
*/
|
||||||
|
$body = preg_replace('/&(\{.*?\};)/si', '&\\1', $body);
|
||||||
|
while (($curtag = tln_getnxtag($body, $curpos)) != FALSE){
|
||||||
|
list($tagname, $attary, $tagtype, $lt, $gt) = $curtag;
|
||||||
|
$free_content = substr($body, $curpos, $lt - $curpos);
|
||||||
|
if ($skip_content == false){
|
||||||
|
$trusted .= $free_content;
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
if ($tagname != FALSE){
|
||||||
|
if ($tagtype == 2){
|
||||||
|
if ($skip_content == $tagname){
|
||||||
|
/**
|
||||||
|
* Got to the end of tag we needed to remove.
|
||||||
|
*/
|
||||||
|
$tagname = false;
|
||||||
|
$skip_content = false;
|
||||||
|
} else {
|
||||||
|
if ($skip_content == false){
|
||||||
|
if (isset($open_tags{$tagname}) &&
|
||||||
|
$open_tags{$tagname} > 0){
|
||||||
|
$open_tags{$tagname}--;
|
||||||
|
} else {
|
||||||
|
$tagname = false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
/**
|
||||||
|
* $rm_tags_with_content
|
||||||
|
*/
|
||||||
|
if ($skip_content == false){
|
||||||
|
/**
|
||||||
|
* See if this is a self-closing type and change
|
||||||
|
* tagtype appropriately.
|
||||||
|
*/
|
||||||
|
if ($tagtype == 1
|
||||||
|
&& in_array($tagname, $self_closing_tags)){
|
||||||
|
$tagtype = 3;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* See if we should skip this tag and any content
|
||||||
|
* inside it.
|
||||||
|
*/
|
||||||
|
if ($tagtype == 1
|
||||||
|
&& in_array($tagname, $rm_tags_with_content)){
|
||||||
|
$skip_content = $tagname;
|
||||||
|
} else {
|
||||||
|
if (($rm_tags == false
|
||||||
|
&& in_array($tagname, $tag_list)) ||
|
||||||
|
($rm_tags == true
|
||||||
|
&& !in_array($tagname, $tag_list))){
|
||||||
|
$tagname = false;
|
||||||
|
} else {
|
||||||
|
if ($tagtype == 1){
|
||||||
|
if (isset($open_tags{$tagname})){
|
||||||
|
$open_tags{$tagname}++;
|
||||||
|
} else {
|
||||||
|
$open_tags{$tagname} = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* This is where we run other checks.
|
||||||
|
*/
|
||||||
|
if (is_array($attary) && sizeof($attary) > 0){
|
||||||
|
$attary = tln_fixatts($tagname,
|
||||||
|
$attary,
|
||||||
|
$rm_attnames,
|
||||||
|
$bad_attvals,
|
||||||
|
$add_attr_to_tag);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($tagname != false && $skip_content == false){
|
||||||
|
$trusted .= tln_tagprint($tagname, $attary, $tagtype);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
$curpos = $gt + 1;
|
||||||
|
}
|
||||||
|
$trusted .= substr($body, $curpos, strlen($body) - $curpos);
|
||||||
|
if ($force_tag_closing == true){
|
||||||
|
foreach ($open_tags as $tagname=>$opentimes){
|
||||||
|
while ($opentimes > 0){
|
||||||
|
$trusted .= '</' . $tagname . '>';
|
||||||
|
$opentimes--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$trusted .= "\n";
|
||||||
|
}
|
||||||
|
$trusted .= "<!-- end tln_sanitized html -->\n";
|
||||||
|
return $trusted;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Use the nifty htmlfilter library
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
function HTMLFilter($body, $trans_image_path, $block_external_images = false) {
|
||||||
|
|
||||||
|
$tag_list = Array(
|
||||||
|
false,
|
||||||
|
"object",
|
||||||
|
"meta",
|
||||||
|
"html",
|
||||||
|
"head",
|
||||||
|
"base",
|
||||||
|
"link",
|
||||||
|
"frame",
|
||||||
|
"iframe",
|
||||||
|
"plaintext",
|
||||||
|
"marquee"
|
||||||
|
);
|
||||||
|
|
||||||
|
$rm_tags_with_content = Array(
|
||||||
|
"script",
|
||||||
|
"applet",
|
||||||
|
"embed",
|
||||||
|
"title",
|
||||||
|
"frameset",
|
||||||
|
"xmp",
|
||||||
|
"xml"
|
||||||
|
);
|
||||||
|
|
||||||
|
$self_closing_tags = Array(
|
||||||
|
"img",
|
||||||
|
"br",
|
||||||
|
"hr",
|
||||||
|
"input",
|
||||||
|
"outbind"
|
||||||
|
);
|
||||||
|
|
||||||
|
$force_tag_closing = true;
|
||||||
|
|
||||||
|
$rm_attnames = Array(
|
||||||
|
"/.*/" =>
|
||||||
|
Array(
|
||||||
|
// "/target/i",
|
||||||
|
"/^on.*/i",
|
||||||
|
"/^dynsrc/i",
|
||||||
|
"/^data.*/i",
|
||||||
|
"/^lowsrc.*/i"
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$bad_attvals = Array(
|
||||||
|
"/.*/" =>
|
||||||
|
Array(
|
||||||
|
"/^src|background/i" =>
|
||||||
|
Array(
|
||||||
|
Array(
|
||||||
|
"/^([\'\"])\s*\S+script\s*:.*([\'\"])/si",
|
||||||
|
"/^([\'\"])\s*mocha\s*:*.*([\'\"])/si",
|
||||||
|
"/^([\'\"])\s*about\s*:.*([\'\"])/si"
|
||||||
|
),
|
||||||
|
Array(
|
||||||
|
"\\1$trans_image_path\\2",
|
||||||
|
"\\1$trans_image_path\\2",
|
||||||
|
"\\1$trans_image_path\\2",
|
||||||
|
"\\1$trans_image_path\\2"
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"/^href|action/i" =>
|
||||||
|
Array(
|
||||||
|
Array(
|
||||||
|
"/^([\'\"])\s*\S+script\s*:.*([\'\"])/si",
|
||||||
|
"/^([\'\"])\s*mocha\s*:*.*([\'\"])/si",
|
||||||
|
"/^([\'\"])\s*about\s*:.*([\'\"])/si"
|
||||||
|
),
|
||||||
|
Array(
|
||||||
|
"\\1#\\1",
|
||||||
|
"\\1#\\1",
|
||||||
|
"\\1#\\1",
|
||||||
|
"\\1#\\1"
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"/^style/i" =>
|
||||||
|
Array(
|
||||||
|
Array(
|
||||||
|
"/expression/i",
|
||||||
|
"/binding/i",
|
||||||
|
"/behaviou*r/i",
|
||||||
|
"/include-source/i",
|
||||||
|
"/position\s*:\s*absolute/i",
|
||||||
|
"/url\s*\(\s*([\'\"])\s*\S+script\s*:.*([\'\"])\s*\)/si",
|
||||||
|
"/url\s*\(\s*([\'\"])\s*mocha\s*:.*([\'\"])\s*\)/si",
|
||||||
|
"/url\s*\(\s*([\'\"])\s*about\s*:.*([\'\"])\s*\)/si",
|
||||||
|
"/(.*)\s*:\s*url\s*\(\s*([\'\"]*)\s*\S+script\s*:.*([\'\"]*)\s*\)/si"
|
||||||
|
),
|
||||||
|
Array(
|
||||||
|
"idiocy",
|
||||||
|
"idiocy",
|
||||||
|
"idiocy",
|
||||||
|
"idiocy",
|
||||||
|
"",
|
||||||
|
"url(\\1#\\1)",
|
||||||
|
"url(\\1#\\1)",
|
||||||
|
"url(\\1#\\1)",
|
||||||
|
"url(\\1#\\1)",
|
||||||
|
"url(\\1#\\1)",
|
||||||
|
"\\1:url(\\2#\\3)"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($block_external_images){
|
||||||
|
array_push($bad_attvals{'/.*/'}{'/^src|background/i'}[0],
|
||||||
|
'/^([\'\"])\s*https*:.*([\'\"])/si');
|
||||||
|
array_push($bad_attvals{'/.*/'}{'/^src|background/i'}[1],
|
||||||
|
"\\1$trans_image_path\\1");
|
||||||
|
array_push($bad_attvals{'/.*/'}{'/^style/i'}[0],
|
||||||
|
'/url\(([\'\"])\s*https*:.*([\'\"])\)/si');
|
||||||
|
array_push($bad_attvals{'/.*/'}{'/^style/i'}[1],
|
||||||
|
"url(\\1$trans_image_path\\1)");
|
||||||
|
}
|
||||||
|
|
||||||
|
$add_attr_to_tag = Array(
|
||||||
|
"/^a$/i" =>
|
||||||
|
Array('target'=>'"_blank"')
|
||||||
|
);
|
||||||
|
|
||||||
|
$trusted = tln_sanitize($body,
|
||||||
|
$tag_list,
|
||||||
|
$rm_tags_with_content,
|
||||||
|
$self_closing_tags,
|
||||||
|
$force_tag_closing,
|
||||||
|
$rm_attnames,
|
||||||
|
$bad_attvals,
|
||||||
|
$add_attr_to_tag
|
||||||
|
);
|
||||||
|
return $trusted;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
185
phpmailer/extras/ntlm_sasl_client.php
Normal file
185
phpmailer/extras/ntlm_sasl_client.php
Normal file
@@ -0,0 +1,185 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* ntlm_sasl_client.php
|
||||||
|
*
|
||||||
|
* @(#) $Id: ntlm_sasl_client.php,v 1.3 2004/11/17 08:00:37 mlemos Exp $
|
||||||
|
*
|
||||||
|
**
|
||||||
|
** Source: http://www.phpclasses.org/browse/file/7495.html
|
||||||
|
** License: BSD (http://www.phpclasses.org/package/1888-PHP-Single-API-for-standard-authentication-mechanisms.html)
|
||||||
|
** Bundled with Permission
|
||||||
|
**
|
||||||
|
*/
|
||||||
|
|
||||||
|
define("SASL_NTLM_STATE_START", 0);
|
||||||
|
define("SASL_NTLM_STATE_IDENTIFY_DOMAIN", 1);
|
||||||
|
define("SASL_NTLM_STATE_RESPOND_CHALLENGE", 2);
|
||||||
|
define("SASL_NTLM_STATE_DONE", 3);
|
||||||
|
|
||||||
|
class ntlm_sasl_client_class
|
||||||
|
{
|
||||||
|
var $credentials=array();
|
||||||
|
var $state=SASL_NTLM_STATE_START;
|
||||||
|
|
||||||
|
Function Initialize(&$client)
|
||||||
|
{
|
||||||
|
if(!function_exists($function="mcrypt_encrypt")
|
||||||
|
|| !function_exists($function="mhash"))
|
||||||
|
{
|
||||||
|
$extensions=array(
|
||||||
|
"mcrypt_encrypt"=>"mcrypt",
|
||||||
|
"mhash"=>"mhash"
|
||||||
|
);
|
||||||
|
$client->error="the extension ".$extensions[$function]." required by the NTLM SASL client class is not available in this PHP configuration";
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
return(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
Function ASCIIToUnicode($ascii)
|
||||||
|
{
|
||||||
|
for($unicode="",$a=0;$a<strlen($ascii);$a++)
|
||||||
|
$unicode.=substr($ascii,$a,1).chr(0);
|
||||||
|
return($unicode);
|
||||||
|
}
|
||||||
|
|
||||||
|
Function TypeMsg1($domain,$workstation)
|
||||||
|
{
|
||||||
|
$domain_length=strlen($domain);
|
||||||
|
$workstation_length=strlen($workstation);
|
||||||
|
$workstation_offset=32;
|
||||||
|
$domain_offset=$workstation_offset+$workstation_length;
|
||||||
|
return(
|
||||||
|
"NTLMSSP\0".
|
||||||
|
"\x01\x00\x00\x00".
|
||||||
|
"\x07\x32\x00\x00".
|
||||||
|
pack("v",$domain_length).
|
||||||
|
pack("v",$domain_length).
|
||||||
|
pack("V",$domain_offset).
|
||||||
|
pack("v",$workstation_length).
|
||||||
|
pack("v",$workstation_length).
|
||||||
|
pack("V",$workstation_offset).
|
||||||
|
$workstation.
|
||||||
|
$domain
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Function NTLMResponse($challenge,$password)
|
||||||
|
{
|
||||||
|
$unicode=$this->ASCIIToUnicode($password);
|
||||||
|
$md4=mhash(MHASH_MD4,$unicode);
|
||||||
|
$padded=$md4.str_repeat(chr(0),21-strlen($md4));
|
||||||
|
$iv_size=mcrypt_get_iv_size(MCRYPT_DES,MCRYPT_MODE_ECB);
|
||||||
|
$iv=mcrypt_create_iv($iv_size,MCRYPT_RAND);
|
||||||
|
for($response="",$third=0;$third<21;$third+=7)
|
||||||
|
{
|
||||||
|
for($packed="",$p=$third;$p<$third+7;$p++)
|
||||||
|
$packed.=str_pad(decbin(ord(substr($padded,$p,1))),8,"0",STR_PAD_LEFT);
|
||||||
|
for($key="",$p=0;$p<strlen($packed);$p+=7)
|
||||||
|
{
|
||||||
|
$s=substr($packed,$p,7);
|
||||||
|
$b=$s.((substr_count($s,"1") % 2) ? "0" : "1");
|
||||||
|
$key.=chr(bindec($b));
|
||||||
|
}
|
||||||
|
$ciphertext=mcrypt_encrypt(MCRYPT_DES,$key,$challenge,MCRYPT_MODE_ECB,$iv);
|
||||||
|
$response.=$ciphertext;
|
||||||
|
}
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
Function TypeMsg3($ntlm_response,$user,$domain,$workstation)
|
||||||
|
{
|
||||||
|
$domain_unicode=$this->ASCIIToUnicode($domain);
|
||||||
|
$domain_length=strlen($domain_unicode);
|
||||||
|
$domain_offset=64;
|
||||||
|
$user_unicode=$this->ASCIIToUnicode($user);
|
||||||
|
$user_length=strlen($user_unicode);
|
||||||
|
$user_offset=$domain_offset+$domain_length;
|
||||||
|
$workstation_unicode=$this->ASCIIToUnicode($workstation);
|
||||||
|
$workstation_length=strlen($workstation_unicode);
|
||||||
|
$workstation_offset=$user_offset+$user_length;
|
||||||
|
$lm="";
|
||||||
|
$lm_length=strlen($lm);
|
||||||
|
$lm_offset=$workstation_offset+$workstation_length;
|
||||||
|
$ntlm=$ntlm_response;
|
||||||
|
$ntlm_length=strlen($ntlm);
|
||||||
|
$ntlm_offset=$lm_offset+$lm_length;
|
||||||
|
$session="";
|
||||||
|
$session_length=strlen($session);
|
||||||
|
$session_offset=$ntlm_offset+$ntlm_length;
|
||||||
|
return(
|
||||||
|
"NTLMSSP\0".
|
||||||
|
"\x03\x00\x00\x00".
|
||||||
|
pack("v",$lm_length).
|
||||||
|
pack("v",$lm_length).
|
||||||
|
pack("V",$lm_offset).
|
||||||
|
pack("v",$ntlm_length).
|
||||||
|
pack("v",$ntlm_length).
|
||||||
|
pack("V",$ntlm_offset).
|
||||||
|
pack("v",$domain_length).
|
||||||
|
pack("v",$domain_length).
|
||||||
|
pack("V",$domain_offset).
|
||||||
|
pack("v",$user_length).
|
||||||
|
pack("v",$user_length).
|
||||||
|
pack("V",$user_offset).
|
||||||
|
pack("v",$workstation_length).
|
||||||
|
pack("v",$workstation_length).
|
||||||
|
pack("V",$workstation_offset).
|
||||||
|
pack("v",$session_length).
|
||||||
|
pack("v",$session_length).
|
||||||
|
pack("V",$session_offset).
|
||||||
|
"\x01\x02\x00\x00".
|
||||||
|
$domain_unicode.
|
||||||
|
$user_unicode.
|
||||||
|
$workstation_unicode.
|
||||||
|
$lm.
|
||||||
|
$ntlm
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Function Start(&$client, &$message, &$interactions)
|
||||||
|
{
|
||||||
|
if($this->state!=SASL_NTLM_STATE_START)
|
||||||
|
{
|
||||||
|
$client->error="NTLM authentication state is not at the start";
|
||||||
|
return(SASL_FAIL);
|
||||||
|
}
|
||||||
|
$this->credentials=array(
|
||||||
|
"user"=>"",
|
||||||
|
"password"=>"",
|
||||||
|
"realm"=>"",
|
||||||
|
"workstation"=>""
|
||||||
|
);
|
||||||
|
$defaults=array();
|
||||||
|
$status=$client->GetCredentials($this->credentials,$defaults,$interactions);
|
||||||
|
if($status==SASL_CONTINUE)
|
||||||
|
$this->state=SASL_NTLM_STATE_IDENTIFY_DOMAIN;
|
||||||
|
Unset($message);
|
||||||
|
return($status);
|
||||||
|
}
|
||||||
|
|
||||||
|
Function Step(&$client, $response, &$message, &$interactions)
|
||||||
|
{
|
||||||
|
switch($this->state)
|
||||||
|
{
|
||||||
|
case SASL_NTLM_STATE_IDENTIFY_DOMAIN:
|
||||||
|
$message=$this->TypeMsg1($this->credentials["realm"],$this->credentials["workstation"]);
|
||||||
|
$this->state=SASL_NTLM_STATE_RESPOND_CHALLENGE;
|
||||||
|
break;
|
||||||
|
case SASL_NTLM_STATE_RESPOND_CHALLENGE:
|
||||||
|
$ntlm_response=$this->NTLMResponse(substr($response,24,8),$this->credentials["password"]);
|
||||||
|
$message=$this->TypeMsg3($ntlm_response,$this->credentials["user"],$this->credentials["realm"],$this->credentials["workstation"]);
|
||||||
|
$this->state=SASL_NTLM_STATE_DONE;
|
||||||
|
break;
|
||||||
|
case SASL_NTLM_STATE_DONE:
|
||||||
|
$client->error="NTLM authentication was finished without success";
|
||||||
|
return(SASL_FAIL);
|
||||||
|
default:
|
||||||
|
$client->error="invalid NTLM authentication step state";
|
||||||
|
return(SASL_FAIL);
|
||||||
|
}
|
||||||
|
return(SASL_CONTINUE);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
?>
|
||||||
26
phpmailer/language/phpmailer.lang-ar.php
Normal file
26
phpmailer/language/phpmailer.lang-ar.php
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Arabic Version, UTF-8
|
||||||
|
* by : bahjat al mostafa <bahjat983@hotmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP Error: لم نستطع تأكيد الهوية.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP Error: لم نستطع الاتصال بمخدم SMTP.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: لم يتم قبول المعلومات .';
|
||||||
|
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'ترميز غير معروف: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'لم أستطع تنفيذ : ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'لم نستطع الوصول للملف: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'File Error: لم نستطع فتح الملف: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'البريد التالي لم نستطع ارسال البريد له : ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'لم نستطع توفير خدمة البريد.';
|
||||||
|
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer غير مدعوم.';
|
||||||
|
//$PHPMAILER_LANG['provide_address'] = 'You must provide at least one recipient email address.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: الأخطاء التالية ' .
|
||||||
|
'فشل في الارسال لكل من : ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'خطأ في التوقيع: ';
|
||||||
|
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||||
|
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||||
|
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||||
26
phpmailer/language/phpmailer.lang-br.php
Normal file
26
phpmailer/language/phpmailer.lang-br.php
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Portuguese Version
|
||||||
|
* By Paulo Henrique Garcia - paulo@controllerweb.com.br
|
||||||
|
* Edited by Lucas Guimarães - lucas@lucasguimaraes.com
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'Erro de SMTP: Não foi possível autenticar.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'Erro de SMTP: Não foi possível conectar com o servidor SMTP.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'Erro de SMTP: Dados rejeitados.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Corpo da mensagem vazio';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Não foi possível executar: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Não foi possível acessar o arquivo: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: Não foi possível abrir o arquivo: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Os endereços dos remententes a seguir falharam: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Não foi possível iniciar uma instância da função mail.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Não enviando, endereço de e-mail inválido: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Você deve fornecer pelo menos um endereço de destinatário de e-mail.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'Erro de SMTP: Os endereços de destinatário a seguir falharam: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Erro ao assinar: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou resetar a variável: ';
|
||||||
25
phpmailer/language/phpmailer.lang-ca.php
Normal file
25
phpmailer/language/phpmailer.lang-ca.php
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Catalan Version
|
||||||
|
* By Ivan: web AT microstudi DOT com
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'Error SMTP: No s\'hapogut autenticar.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'Error SMTP: No es pot connectar al servidor SMTP.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Dades no acceptades.';
|
||||||
|
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Codificació desconeguda: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'No es pot executar: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'No es pot accedir a l\'arxiu: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Error d\'Arxiu: No es pot obrir l\'arxiu: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'La(s) següent(s) adreces de remitent han fallat: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'No s\'ha pogut crear una instància de la funció Mail.';
|
||||||
|
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no està suportat';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'S\'ha de proveir almenys una adreça d\'email com a destinatari.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Els següents destinataris han fallat: ';
|
||||||
|
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||||
|
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||||
|
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||||
|
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||||
25
phpmailer/language/phpmailer.lang-ch.php
Normal file
25
phpmailer/language/phpmailer.lang-ch.php
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Chinese Version
|
||||||
|
* By LiuXin: www.80x86.cn/blog/
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。';
|
||||||
|
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||||
|
$PHPMAILER_LANG['encoding'] = '未知编码:';
|
||||||
|
$PHPMAILER_LANG['execute'] = '不能执行: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = '不能访问文件:';
|
||||||
|
$PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = '不能实现mail方法。';
|
||||||
|
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: ';
|
||||||
|
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||||
|
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||||
|
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||||
|
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||||
24
phpmailer/language/phpmailer.lang-cz.php
Normal file
24
phpmailer/language/phpmailer.lang-cz.php
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Czech Version
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Chyba autentikace.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Nelze navázat spojení se SMTP serverem.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Data nebyla pøijata';
|
||||||
|
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Neznámé kódování: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Nelze provést: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Soubor nenalezen: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'File Error: Nelze otevøít soubor pro ètení: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Následující adresa From je nesprávná: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Nelze vytvoøit instanci emailové funkce.';
|
||||||
|
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailový klient není podporován.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Musíte zadat alespoò jednu emailovou adresu pøíjemce.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Adresy pøíjemcù nejsou správné ';
|
||||||
|
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||||
|
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||||
|
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||||
|
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||||
24
phpmailer/language/phpmailer.lang-de.php
Normal file
24
phpmailer/language/phpmailer.lang-de.php
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* German Version
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP Fehler: Authentifizierung fehlgeschlagen.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP Fehler: Konnte keine Verbindung zum SMTP-Host herstellen.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Fehler: Daten werden nicht akzeptiert.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'E-Mail Inhalt ist leer.';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Unbekanntes Encoding-Format: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Konnte folgenden Befehl nicht ausführen: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Zugriff auf folgende Datei fehlgeschlagen: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Datei Fehler: konnte folgende Datei nicht öffnen: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Die folgende Absenderadresse ist nicht korrekt: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Mail Funktion konnte nicht initialisiert werden.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'E-Mail wird nicht gesendet, die Adresse ist ungültig.';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wird nicht unterstützt.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Bitte geben Sie mindestens eine Empfänger E-Mailadresse an.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Fehler: Die folgenden Empfänger sind nicht korrekt: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Fehler beim Signieren: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'Verbindung zu SMTP Server fehlgeschlagen.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'Fehler vom SMTP Server: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Kann Variable nicht setzen oder zurücksetzen: ';
|
||||||
25
phpmailer/language/phpmailer.lang-dk.php
Normal file
25
phpmailer/language/phpmailer.lang-dk.php
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Danish Version
|
||||||
|
* Author: Mikael Stokkebro <info@stokkebro.dk>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Kunne ikke logge på.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Kunne ikke tilslutte SMTP serveren.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data kunne ikke accepteres.';
|
||||||
|
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Ukendt encode-format: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Kunne ikke køre: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Ingen adgang til fil: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Fil fejl: Kunne ikke åbne filen: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Følgende afsenderadresse er forkert: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Kunne ikke initialisere email funktionen.';
|
||||||
|
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer understøttes ikke.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Du skal indtaste mindst en modtagers emailadresse.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere er forkerte: ';
|
||||||
|
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||||
|
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||||
|
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||||
|
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||||
23
phpmailer/language/phpmailer.lang-eo.php
Normal file
23
phpmailer/language/phpmailer.lang-eo.php
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Esperanto version
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'Eraro de servilo SMTP : aŭtentigo malsukcesis.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'Eraro de servilo SMTP : konektado al servilo malsukcesis.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'Eraro de servilo SMTP : neĝustaj datumoj.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Teksto de mesaĝo mankas.';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Nekonata kodoprezento: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Lanĉi rulumadon ne eblis: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Aliro al dosiero ne sukcesis: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Eraro de dosiero: malfermo neeblas: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Jena adreso de sendinto malsukcesis: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Genero de retmesaĝa funkcio neeblis.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Retadreso ne validas: ';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Vi devas tajpi almenaŭ unu recevontan retadreson.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'Eraro de servilo SMTP : la jenaj poŝtrecivuloj kaŭzis eraron: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Eraro de subskribo: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP konektado malsukcesis.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'Eraro de servilo SMTP : ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Variablo ne pravalorizeblas aŭ ne repravalorizeblas: ';
|
||||||
26
phpmailer/language/phpmailer.lang-es.php
Normal file
26
phpmailer/language/phpmailer.lang-es.php
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Spanish version
|
||||||
|
* Versión en español
|
||||||
|
* Edited by Matt Sturdy - matt.sturdy@gmail.com
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'Error SMTP: No se pudo autentificar.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'Error SMTP: No se pudo conectar al servidor SMTP.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Datos no aceptados.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Cuerpo del mensaje vacío';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Codificación desconocida: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'No se pudo ejecutar: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'No se pudo acceder al archivo: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Error de Archivo: No se pudo abrir el archivo: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'La(s) siguiente(s) direcciones de remitente fallaron: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'No se pudo crear una instancia de la función Mail.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'No se pudo enviar: dirección de email inválido: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no está soportado.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Debe proveer al menos una dirección de email como destino.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Los siguientes destinos fallaron: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Error al firmar: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() se falló.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'No se pudo ajustar o reajustar la variable: ';
|
||||||
26
phpmailer/language/phpmailer.lang-et.php
Normal file
26
phpmailer/language/phpmailer.lang-et.php
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Estonian Version
|
||||||
|
* By Indrek Päri
|
||||||
|
* Revised By Elan Ruusamäe <glen@delfi.ee>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP Viga: Autoriseerimise viga.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP Viga: Ei õnnestunud luua ühendust SMTP serveriga.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Viga: Vigased andmed.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Tühi kirja sisu';
|
||||||
|
$PHPMAILER_LANG["encoding"] = 'Tundmatu kodeering: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Tegevus ebaõnnestus: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Pole piisavalt õiguseid järgneva faili avamiseks: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Faili Viga: Faili avamine ebaõnnestus: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Järgnev saatja e-posti aadress on vigane: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'mail funktiooni käivitamine ebaõnnestus.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Saatmine peatatud, e-posti address vigane: ';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Te peate määrama vähemalt ühe saaja e-posti aadressi.';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' maileri tugi puudub.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Viga: Järgnevate saajate e-posti aadressid on vigased: ';
|
||||||
|
$PHPMAILER_LANG["signing"] = 'Viga allkirjastamisel: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() ebaõnnestus.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'SMTP serveri viga: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Ei õnnestunud määrata või lähtestada muutujat: ';
|
||||||
26
phpmailer/language/phpmailer.lang-fi.php
Normal file
26
phpmailer/language/phpmailer.lang-fi.php
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Finnish Version
|
||||||
|
* By Jyry Kuukanen
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP-virhe: käyttäjätunnistus epäonnistui.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP-virhe: yhteys palvelimeen ei onnistu.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-virhe: data on virheellinen.';
|
||||||
|
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Tuntematon koodaustyyppi: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Suoritus epäonnistui: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Seuraavaan tiedostoon ei ole oikeuksia: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Tiedostovirhe: Ei voida avata tiedostoa: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Seuraava lähettäjän osoite on virheellinen: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'mail-funktion luonti epäonnistui.';
|
||||||
|
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = 'postivälitintyyppiä ei tueta.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Aseta vähintään yksi vastaanottajan sähköpostiosoite.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-virhe: seuraava vastaanottaja osoite on virheellinen.';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Tuntematon koodaustyyppi: ';
|
||||||
|
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||||
|
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||||
|
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||||
|
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||||
26
phpmailer/language/phpmailer.lang-fo.php
Normal file
26
phpmailer/language/phpmailer.lang-fo.php
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Faroese Version [language of the Faroe Islands, a Danish dominion]
|
||||||
|
* This file created: 11-06-2004
|
||||||
|
* Supplied by Dávur Sørensen [www.profo-webdesign.dk]
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP feilur: Kundi ikki góðkenna.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP feilur: Kundi ikki knýta samband við SMTP vert.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP feilur: Data ikki góðkent.';
|
||||||
|
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Ókend encoding: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Kundi ikki útføra: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Kundi ikki tilganga fílu: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Fílu feilur: Kundi ikki opna fílu: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'fylgjandi Frá/From adressa miseydnaðist: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Kuni ikki instantiera mail funktión.';
|
||||||
|
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' er ikki supporterað.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Tú skal uppgeva minst móttakara-emailadressu(r).';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Feilur: Fylgjandi móttakarar miseydnaðust: ';
|
||||||
|
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||||
|
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||||
|
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||||
|
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||||
24
phpmailer/language/phpmailer.lang-fr.php
Normal file
24
phpmailer/language/phpmailer.lang-fr.php
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* French Version
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'Erreur SMTP : échec de l\'authentification.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'Erreur SMTP : impossible de se connecter au serveur SMTP.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'Erreur SMTP : données incorrectes.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Corps de message vide';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Encodage inconnu : ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Impossible de lancer l\'exécution : ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Impossible d\'accéder au fichier : ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Erreur de fichier : ouverture impossible : ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'L\'adresse d\'expéditeur suivante a échouée : ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Impossible d\'instancier la fonction mail.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'L\'adresse courriel n\'est pas valide : ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' client de messagerie non supporté.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Vous devez fournir au moins une adresse de destinataire.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'Erreur SMTP : les destinataires suivants sont en erreur : ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Erreur de signature : ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'Échec de la connexion SMTP.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'Erreur du serveur SMTP : ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Ne peut initialiser ou réinitialiser une variable : ';
|
||||||
25
phpmailer/language/phpmailer.lang-he.php
Normal file
25
phpmailer/language/phpmailer.lang-he.php
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Hebrew Version, UTF-8
|
||||||
|
* by : Ronny Sherer <ronny@hoojima.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'שגיאת SMTP: פעולת האימות נכשלה.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'שגיאת SMTP: לא הצלחתי להתחבר לשרת SMTP.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'שגיאת SMTP: מידע לא התקבל.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'גוף ההודעה ריק';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'כתובת שגויה';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'קידוד לא מוכר: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'לא הצלחתי להפעיל את: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'לא ניתן לגשת לקובץ: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'שגיאת קובץ: לא ניתן לגשת לקובץ: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'כתובות הנמענים הבאות נכשלו: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'לא הצלחתי להפעיל את פונקציית המייל.';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' אינה נתמכת.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'חובה לספק לפחות כתובת אחת של מקבל המייל.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'שגיאת SMTP: הנמענים הבאים נכשלו: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'שגיאת חתימה: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'שגיאת שרת SMTP: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'לא ניתן לקבוע או לשנות את המשתנה: ';
|
||||||
24
phpmailer/language/phpmailer.lang-hu.php
Normal file
24
phpmailer/language/phpmailer.lang-hu.php
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Hungarian Version
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP Hiba: Sikertelen autentikáció.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP Hiba: Nem tudtam csatlakozni az SMTP host-hoz.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Hiba: Nem elfogadható adat.';
|
||||||
|
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Ismeretlen kódolás: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Nem tudtam végrehajtani: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Nem sikerült elérni a következõ fájlt: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Fájl Hiba: Nem sikerült megnyitni a következõ fájlt: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Az alábbi Feladó cím hibás: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Nem sikerült példányosítani a mail funkciót.';
|
||||||
|
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Meg kell adnod legalább egy címzett email címet.';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' levelezõ nem támogatott.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Hiba: Az alábbi címzettek hibásak: ';
|
||||||
|
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||||
|
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||||
|
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||||
|
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||||
26
phpmailer/language/phpmailer.lang-it.php
Normal file
26
phpmailer/language/phpmailer.lang-it.php
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Italian version
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Ilias Bartolini <brain79@inwind.it>, Stefano Sabatini <sabas88@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Impossibile autenticarsi.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Impossibile connettersi all\'host SMTP.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Dati non accettati dal server.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Il corpo del messaggio è vuoto';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Codifica dei caratteri sconosciuta: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Impossibile eseguire l\'operazione: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Impossibile accedere al file: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'File Error: Impossibile aprire il file: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'I seguenti indirizzi mittenti hanno generato errore: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Impossibile istanziare la funzione mail';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Impossibile inviare, l\'indirizzo email non è valido: ';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Deve essere fornito almeno un indirizzo ricevente';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = 'Mailer non supportato';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: I seguenti indirizzi destinatari hanno generato un errore: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Errore nella firma: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fallita.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'Errore del server SMTP: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Impossibile impostare o resettare la variabile: ';
|
||||||
26
phpmailer/language/phpmailer.lang-ja.php
Normal file
26
phpmailer/language/phpmailer.lang-ja.php
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Japanese Version
|
||||||
|
* By Mitsuhiro Yoshida - http://mitstek.com/
|
||||||
|
* Modified by Yoshi Sakai - http://bluemooninc.jp/
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。';
|
||||||
|
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||||
|
$PHPMAILER_LANG['encoding'] = '不明なエンコーディング: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = '実行できませんでした: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。';
|
||||||
|
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: ';
|
||||||
|
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||||
|
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||||
|
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||||
|
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||||
24
phpmailer/language/phpmailer.lang-nl.php
Normal file
24
phpmailer/language/phpmailer.lang-nl.php
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to class.phpmailer.php for definitive list.
|
||||||
|
* Dutch Version by Tuxion <team@tuxion.nl>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP-fout: authenticatie mislukt.';//SMTP Error: Could not authenticate.
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon niet verbinden met SMTP-host.';//SMTP Error: Could not connect to SMTP host.
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data niet geaccepteerd.';//SMTP Error: Data not accepted.
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Berichttekst is leeg';//Message body empty
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Onbekende codering: ';//Unknown encoding:
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Kon niet uitvoeren: ';//Could not execute:
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Kreeg geen toegang tot bestand: ';//Could not access file:
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Bestandsfout: kon bestand niet openen: ';//File Error: Could not open file:
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Het volgende afzendersadres is mislukt: ';//The following From address failed:
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Kon mailfunctie niet initialiseren.';//Could not instantiate mail function.
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Ongeldig adres';//Invalid address
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wordt niet ondersteund.';// mailer is not supported.
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Er moet minstens één ontvanger worden opgegeven.';//You must provide at least one recipient email address.
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: de volgende ontvangers zijn mislukt: ';//SMTP Error: The following recipients failed:
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Signeerfout: ';//Signing Error:
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Verbinding mislukt.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfout: ';//SMTP server error:
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Kan de volgende variablen niet instellen of resetten: ';//Cannot set or reset variable:
|
||||||
24
phpmailer/language/phpmailer.lang-no.php
Normal file
24
phpmailer/language/phpmailer.lang-no.php
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Norwegian Version
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP Feil: Kunne ikke authentisere.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP Feil: Kunne ikke koble til SMTP host.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Feil: Data ble ikke akseptert.';
|
||||||
|
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Ukjent encoding: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Kunne ikke utføre: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Kunne ikke få tilgang til filen: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Fil feil: Kunne ikke åpne filen: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Følgende Fra feilet: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Kunne ikke instantiate mail funksjonen.';
|
||||||
|
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Du må ha med minst en mottager adresse.';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer er ikke supportert.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Feil: Følgende mottagere feilet: ';
|
||||||
|
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||||
|
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||||
|
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||||
|
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||||
24
phpmailer/language/phpmailer.lang-pl.php
Normal file
24
phpmailer/language/phpmailer.lang-pl.php
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Polish Version
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'Błąd SMTP: Nie można przeprowadzić autentykacji.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'Błąd SMTP: Nie można połączyć się z wybranym hostem.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'Błąd SMTP: Dane nie zostały przyjęte.';
|
||||||
|
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Nieznany sposób kodowania znaków: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Nie można uruchomić: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Brak dostępu do pliku: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Nie można otworzyć pliku: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Następujący adres Nadawcy jest jest nieprawidłowy: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Nie można wywołać funkcji mail(). Sprawdź konfigurację serwera.';
|
||||||
|
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Należy podać prawidłowy adres email Odbiorcy.';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = 'Wybrana metoda wysyłki wiadomości nie jest obsługiwana.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'Błąd SMTP: Następujący odbiorcy są nieprawidłowi: ';
|
||||||
|
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||||
|
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||||
|
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||||
|
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||||
26
phpmailer/language/phpmailer.lang-ro.php
Normal file
26
phpmailer/language/phpmailer.lang-ro.php
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Romanian Version
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Catalin Constantin <catalin@dazoot.ro>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'Eroare SMTP: Nu a functionat autentificarea.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'Eroare SMTP: Nu m-am putut conecta la adresa SMTP.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Continutul mailului nu a fost acceptat.';
|
||||||
|
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Encodare necunoscuta: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Nu pot executa: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Nu pot accesa fisierul: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Eroare de fisier: Nu pot deschide fisierul: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Urmatoarele adrese From au dat eroare: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Nu am putut instantia functia mail.';
|
||||||
|
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nu este suportat.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Trebuie sa adaugati cel putin un recipient (adresa de mail).';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'Eroare SMTP: Urmatoarele adrese de mail au dat eroare: ';
|
||||||
|
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||||
|
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||||
|
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||||
|
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||||
24
phpmailer/language/phpmailer.lang-ru.php
Normal file
24
phpmailer/language/phpmailer.lang-ru.php
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Russian Version by Alexey Chumakov <alex@chumakov.ru>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'Ошибка SMTP: ошибка авторизации.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'Ошибка SMTP: не удается подключиться к серверу SMTP.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'Ошибка SMTP: данные не приняты.';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Неизвестный вид кодировки: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Невозможно выполнить команду: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Нет доступа к файлу: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Файловая ошибка: не удается открыть файл: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Неверный адрес отправителя: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Невозможно запустить функцию mail.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Пожалуйста, введите хотя бы один адрес e-mail получателя.';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' - почтовый сервер не поддерживается.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'Ошибка SMTP: отправка по следующим адресам получателей не удалась: ';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Пустое тело сообщения';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Не отослано, неправильный формат email адреса: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Ошибка подписывания: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'Ошибка соединения с SMTP-сервером';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'Ошибка SMTP-сервера: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Невозможно установить или переустановить переменную: ';
|
||||||
25
phpmailer/language/phpmailer.lang-se.php
Normal file
25
phpmailer/language/phpmailer.lang-se.php
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Swedish Version
|
||||||
|
* Author: Johan Linnér <johan@linner.biz>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP fel: Kunde inte autentisera.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP fel: Kunde inte ansluta till SMTP-server.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fel: Data accepterades inte.';
|
||||||
|
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Okänt encode-format: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Kunde inte köra: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Ingen åtkomst till fil: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Fil fel: Kunde inte öppna fil: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Följande avsändaradress är felaktig: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Kunde inte initiera e-postfunktion.';
|
||||||
|
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Du måste ange minst en mottagares e-postadress.';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer stöds inte.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP fel: Följande mottagare är felaktig: ';
|
||||||
|
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||||
|
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||||
|
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||||
|
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||||
25
phpmailer/language/phpmailer.lang-sk.php
Normal file
25
phpmailer/language/phpmailer.lang-sk.php
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Slovak Version
|
||||||
|
* Author: Michal Tinka <michaltinka@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Chyba autentifikácie.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Nebolo možné nadviazať spojenie so SMTP serverom.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Dáta neboli prijaté';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Prázdne telo správy.';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Neznáme kódovanie: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Nedá sa vykonať: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Súbor nebol nájdený: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'File Error: Súbor sa otvoriť pre čítanie: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Následujúca adresa From je nesprávna: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Nedá sa vytvoriť inštancia emailovej funkcie.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Neodoslané, emailová adresa je nesprávna: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' emailový klient nieje podporovaný.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Musíte zadať aspoň jednu emailovú adresu príjemcu.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Adresy príjemcov niesu správne ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Chyba prihlasovania: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() zlyhalo.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'SMTP chyba serveru: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Nemožno nastaviť alebo resetovať premennú: ';
|
||||||
26
phpmailer/language/phpmailer.lang-tr.php
Normal file
26
phpmailer/language/phpmailer.lang-tr.php
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Turkish version
|
||||||
|
* Türkçe Versiyonu
|
||||||
|
* ÝZYAZILIM - Elçin Özel - Can Yýlmaz - Mehmet Benlioðlu
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP Hatası: Doğrulanamıyor.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP Hatası: SMTP hosta bağlanılamıyor.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Hatası: Veri kabul edilmedi.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Mesaj içeriği boş';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Bilinmeyen şifreleme: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Çalıtırılamıyor: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Dosyaya erişilemiyor: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Dosya Hatası: Dosya açılamıyor: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Başarısız olan gönderici adresi: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Örnek mail fonksiyonu oluşturulamadı.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Gönderilmedi, email adresi geçersiz: ';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'En az bir tane mail adresi belirtmek zorundasınız alıcının email adresi.';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailler desteklenmemektedir.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Hatası: alıcılara ulaımadı: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'İmzalama hatası: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP bağlantı() başarısız.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'SMTP sunucu hatası: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Ayarlanamıyor yada sıfırlanamıyor: ';
|
||||||
25
phpmailer/language/phpmailer.lang-zh.php
Normal file
25
phpmailer/language/phpmailer.lang-zh.php
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Traditional Chinese Version
|
||||||
|
* @author liqwei <liqwei@liqwei.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP 錯誤:登錄失敗。';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP 錯誤:無法連接到 SMTP 主機。';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 錯誤:數據不被接受。';
|
||||||
|
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||||
|
$PHPMAILER_LANG['encoding'] = '未知編碼: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = '無法訪問文件:';
|
||||||
|
$PHPMAILER_LANG['file_open'] = '文件錯誤:無法打開文件:';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = '發送地址錯誤:';
|
||||||
|
$PHPMAILER_LANG['execute'] = '無法執行:';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = '未知函數調用。';
|
||||||
|
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = '必須提供至少一個收件人地址。';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = '發信客戶端不被支持。';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:收件人地址錯誤:';
|
||||||
|
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||||
|
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||||
|
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||||
|
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||||
25
phpmailer/language/phpmailer.lang-zh_cn.php
Normal file
25
phpmailer/language/phpmailer.lang-zh_cn.php
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Simplified Chinese Version
|
||||||
|
* @author liqwei <liqwei@liqwei.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。';
|
||||||
|
//$P$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||||
|
$PHPMAILER_LANG['encoding'] = '未知编码: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = '无法执行:';
|
||||||
|
$PHPMAILER_LANG['file_access'] = '无法访问文件:';
|
||||||
|
$PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = '发送地址错误:';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = '未知函数调用。';
|
||||||
|
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:';
|
||||||
|
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||||
|
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||||
|
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||||
|
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||||
10
phpmailer/test/contents.html
Normal file
10
phpmailer/test/contents.html
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Email test</title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>Here is a test HTML email</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
21
phpmailer/test/fakesendmail.sh
Normal file
21
phpmailer/test/fakesendmail.sh
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#Fake sendmail script, adapted from:
|
||||||
|
#https://github.com/mrded/MNPP/blob/ee64fb2a88efc70ba523b78e9ce61f9f1ed3b4a9/init/fake-sendmail.sh
|
||||||
|
numPath="/tmp/fakemail"
|
||||||
|
|
||||||
|
mkdir -p $numPath
|
||||||
|
|
||||||
|
if [ ! -f $numPath/num ]; then
|
||||||
|
echo "0" > $numPath/num
|
||||||
|
fi
|
||||||
|
num=`cat $numPath/num`
|
||||||
|
num=$(($num + 1))
|
||||||
|
echo $num > $numPath/num
|
||||||
|
|
||||||
|
name="$numPath/letter_$num.txt"
|
||||||
|
while read line
|
||||||
|
do
|
||||||
|
echo $line >> $name
|
||||||
|
done
|
||||||
|
chmod 777 $name
|
||||||
|
/bin/true
|
||||||
344
phpmailer/test/phpmailerLangTest.php
Normal file
344
phpmailer/test/phpmailerLangTest.php
Normal file
@@ -0,0 +1,344 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer - language file tests
|
||||||
|
* Before running these tests you need to install PHPUnit 3.3 or later through pear, like this:
|
||||||
|
* pear install "channel://pear.phpunit.de/PHPUnit"
|
||||||
|
* Then run the tests like this:
|
||||||
|
* phpunit phpmailerLangTest
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Andy Prevost
|
||||||
|
* @author Marcus Bointon
|
||||||
|
* @copyright 2004 - 2009 Andy Prevost
|
||||||
|
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
||||||
|
*/
|
||||||
|
|
||||||
|
require 'PHPUnit/Autoload.php';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PHPMailer - PHP email transport unit test class
|
||||||
|
* Performs authentication tests
|
||||||
|
*/
|
||||||
|
class phpmailerLangTest extends PHPUnit_Framework_TestCase
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Holds the default phpmailer instance.
|
||||||
|
* @private
|
||||||
|
* @var PHPMailer
|
||||||
|
*/
|
||||||
|
public $Mail;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds the SMTP mail host.
|
||||||
|
* @public
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $Host = "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds the change log.
|
||||||
|
* @private
|
||||||
|
* @var string[]
|
||||||
|
*/
|
||||||
|
public $ChangeLog = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds the note log.
|
||||||
|
* @private
|
||||||
|
* @var string[]
|
||||||
|
*/
|
||||||
|
public $NoteLog = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Default include path
|
||||||
|
*/
|
||||||
|
public $INCLUDE_DIR = '../';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Run before each test is started.
|
||||||
|
*/
|
||||||
|
function setUp()
|
||||||
|
{
|
||||||
|
|
||||||
|
if (file_exists('./testbootstrap.php')) {
|
||||||
|
include './testbootstrap.php'; //Overrides go in here
|
||||||
|
}
|
||||||
|
require_once $this->INCLUDE_DIR . 'class.phpmailer.php';
|
||||||
|
$this->Mail = new PHPMailer;
|
||||||
|
|
||||||
|
$this->Mail->Priority = 3;
|
||||||
|
$this->Mail->Encoding = "8bit";
|
||||||
|
$this->Mail->CharSet = "iso-8859-1";
|
||||||
|
if (array_key_exists('mail_from', $_REQUEST)) {
|
||||||
|
$this->Mail->From = $_REQUEST['mail_from'];
|
||||||
|
} else {
|
||||||
|
$this->Mail->From = 'unit_test@phpmailer.example.com';
|
||||||
|
}
|
||||||
|
$this->Mail->FromName = "Unit Tester";
|
||||||
|
$this->Mail->Sender = "";
|
||||||
|
$this->Mail->Subject = "Unit Test";
|
||||||
|
$this->Mail->Body = "";
|
||||||
|
$this->Mail->AltBody = "";
|
||||||
|
$this->Mail->WordWrap = 0;
|
||||||
|
if (array_key_exists('mail_host', $_REQUEST)) {
|
||||||
|
$this->Mail->Host = $_REQUEST['mail_host'];
|
||||||
|
} else {
|
||||||
|
$this->Mail->Host = 'mail.example.com';
|
||||||
|
}
|
||||||
|
if (array_key_exists('mail_port', $_REQUEST)) {
|
||||||
|
$this->Mail->Port = $_REQUEST['mail_port'];
|
||||||
|
} else {
|
||||||
|
$this->Mail->Port = 25;
|
||||||
|
}
|
||||||
|
$this->Mail->Helo = "localhost.localdomain";
|
||||||
|
$this->Mail->SMTPAuth = false;
|
||||||
|
$this->Mail->Username = "";
|
||||||
|
$this->Mail->Password = "";
|
||||||
|
$this->Mail->PluginDir = $this->INCLUDE_DIR;
|
||||||
|
$this->Mail->AddReplyTo("no_reply@phpmailer.example.com", "Reply Guy");
|
||||||
|
$this->Mail->Sender = "unit_test@phpmailer.example.com";
|
||||||
|
|
||||||
|
if (strlen($this->Mail->Host) > 0) {
|
||||||
|
$this->Mail->Mailer = "smtp";
|
||||||
|
} else {
|
||||||
|
$this->Mail->Mailer = "mail";
|
||||||
|
$this->Mail->Sender = "unit_test@phpmailer.example.com";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (array_key_exists('mail_to', $_REQUEST)) {
|
||||||
|
$this->SetAddress($_REQUEST['mail_to'], 'Test User', 'to');
|
||||||
|
}
|
||||||
|
if (array_key_exists('mail_cc', $_REQUEST) and strlen($_REQUEST['mail_cc']) > 0) {
|
||||||
|
$this->SetAddress($_REQUEST['mail_cc'], 'Carbon User', 'cc');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Run after each test is completed.
|
||||||
|
*/
|
||||||
|
function tearDown()
|
||||||
|
{
|
||||||
|
// Clean global variables
|
||||||
|
$this->Mail = null;
|
||||||
|
$this->ChangeLog = array();
|
||||||
|
$this->NoteLog = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build the body of the message in the appropriate format.
|
||||||
|
* @private
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
function BuildBody()
|
||||||
|
{
|
||||||
|
$this->CheckChanges();
|
||||||
|
|
||||||
|
// Determine line endings for message
|
||||||
|
if ($this->Mail->ContentType == "text/html" || strlen($this->Mail->AltBody) > 0) {
|
||||||
|
$eol = "<br/>";
|
||||||
|
$bullet = "<li>";
|
||||||
|
$bullet_start = "<ul>";
|
||||||
|
$bullet_end = "</ul>";
|
||||||
|
} else {
|
||||||
|
$eol = "\n";
|
||||||
|
$bullet = " - ";
|
||||||
|
$bullet_start = "";
|
||||||
|
$bullet_end = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
$ReportBody = "";
|
||||||
|
|
||||||
|
$ReportBody .= "---------------------" . $eol;
|
||||||
|
$ReportBody .= "Unit Test Information" . $eol;
|
||||||
|
$ReportBody .= "---------------------" . $eol;
|
||||||
|
$ReportBody .= "phpmailer version: " . $this->Mail->Version . $eol;
|
||||||
|
$ReportBody .= "Content Type: " . $this->Mail->ContentType . $eol;
|
||||||
|
|
||||||
|
if (strlen($this->Mail->Host) > 0) {
|
||||||
|
$ReportBody .= "Host: " . $this->Mail->Host . $eol;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If attachments then create an attachment list
|
||||||
|
$attachments = $this->Mail->GetAttachments();
|
||||||
|
if (count($attachments) > 0) {
|
||||||
|
$ReportBody .= "Attachments:" . $eol;
|
||||||
|
$ReportBody .= $bullet_start;
|
||||||
|
foreach ($attachments as $attachment) {
|
||||||
|
$ReportBody .= $bullet . "Name: " . $attachment[1] . ", ";
|
||||||
|
$ReportBody .= "Encoding: " . $attachment[3] . ", ";
|
||||||
|
$ReportBody .= "Type: " . $attachment[4] . $eol;
|
||||||
|
}
|
||||||
|
$ReportBody .= $bullet_end . $eol;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If there are changes then list them
|
||||||
|
if (count($this->ChangeLog) > 0) {
|
||||||
|
$ReportBody .= "Changes" . $eol;
|
||||||
|
$ReportBody .= "-------" . $eol;
|
||||||
|
|
||||||
|
$ReportBody .= $bullet_start;
|
||||||
|
for ($i = 0; $i < count($this->ChangeLog); $i++) {
|
||||||
|
$ReportBody .= $bullet . $this->ChangeLog[$i][0] . " was changed to [" .
|
||||||
|
$this->ChangeLog[$i][1] . "]" . $eol;
|
||||||
|
}
|
||||||
|
$ReportBody .= $bullet_end . $eol . $eol;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If there are notes then list them
|
||||||
|
if (count($this->NoteLog) > 0) {
|
||||||
|
$ReportBody .= "Notes" . $eol;
|
||||||
|
$ReportBody .= "-----" . $eol;
|
||||||
|
|
||||||
|
$ReportBody .= $bullet_start;
|
||||||
|
for ($i = 0; $i < count($this->NoteLog); $i++) {
|
||||||
|
$ReportBody .= $bullet . $this->NoteLog[$i] . $eol;
|
||||||
|
}
|
||||||
|
$ReportBody .= $bullet_end;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Re-attach the original body
|
||||||
|
$this->Mail->Body .= $eol . $eol . $ReportBody;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check which default settings have been changed for the report.
|
||||||
|
* @private
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
function CheckChanges()
|
||||||
|
{
|
||||||
|
if ($this->Mail->Priority != 3) {
|
||||||
|
$this->AddChange("Priority", $this->Mail->Priority);
|
||||||
|
}
|
||||||
|
if ($this->Mail->Encoding != "8bit") {
|
||||||
|
$this->AddChange("Encoding", $this->Mail->Encoding);
|
||||||
|
}
|
||||||
|
if ($this->Mail->CharSet != "iso-8859-1") {
|
||||||
|
$this->AddChange("CharSet", $this->Mail->CharSet);
|
||||||
|
}
|
||||||
|
if ($this->Mail->Sender != "") {
|
||||||
|
$this->AddChange("Sender", $this->Mail->Sender);
|
||||||
|
}
|
||||||
|
if ($this->Mail->WordWrap != 0) {
|
||||||
|
$this->AddChange("WordWrap", $this->Mail->WordWrap);
|
||||||
|
}
|
||||||
|
if ($this->Mail->Mailer != "mail") {
|
||||||
|
$this->AddChange("Mailer", $this->Mail->Mailer);
|
||||||
|
}
|
||||||
|
if ($this->Mail->Port != 25) {
|
||||||
|
$this->AddChange("Port", $this->Mail->Port);
|
||||||
|
}
|
||||||
|
if ($this->Mail->Helo != "localhost.localdomain") {
|
||||||
|
$this->AddChange("Helo", $this->Mail->Helo);
|
||||||
|
}
|
||||||
|
if ($this->Mail->SMTPAuth) {
|
||||||
|
$this->AddChange("SMTPAuth", "true");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a changelog entry.
|
||||||
|
* @access private
|
||||||
|
* @param string $sName
|
||||||
|
* @param string $sNewValue
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function AddChange($sName, $sNewValue)
|
||||||
|
{
|
||||||
|
$this->ChangeLog[] = array($sName, $sNewValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a simple note to the message.
|
||||||
|
* @public
|
||||||
|
* @param string $sValue
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function AddNote($sValue)
|
||||||
|
{
|
||||||
|
$this->NoteLog[] = $sValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds all of the addresses
|
||||||
|
* @access public
|
||||||
|
* @param string $sAddress
|
||||||
|
* @param string $sName
|
||||||
|
* @param string $sType
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
function SetAddress($sAddress, $sName = '', $sType = 'to')
|
||||||
|
{
|
||||||
|
switch ($sType) {
|
||||||
|
case 'to':
|
||||||
|
return $this->Mail->AddAddress($sAddress, $sName);
|
||||||
|
case 'cc':
|
||||||
|
return $this->Mail->AddCC($sAddress, $sName);
|
||||||
|
case "bcc":
|
||||||
|
return $this->Mail->AddBCC($sAddress, $sName);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////
|
||||||
|
// UNIT TESTS
|
||||||
|
/////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test language files for missing and excess translations
|
||||||
|
* All languages are compared with English
|
||||||
|
*/
|
||||||
|
function test_Translations()
|
||||||
|
{
|
||||||
|
$this->Mail->SetLanguage('en');
|
||||||
|
$definedStrings = $this->Mail->GetTranslations();
|
||||||
|
$err = '';
|
||||||
|
foreach (new DirectoryIterator('../language') as $fileInfo) {
|
||||||
|
if ($fileInfo->isDot()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$matches = array();
|
||||||
|
//Only look at language files, ignore anything else in there
|
||||||
|
if (preg_match('/^phpmailer\.lang-([a-z_]{2,})\.php$/', $fileInfo->getFilename(), $matches)) {
|
||||||
|
$lang = $matches[1]; //Extract language code
|
||||||
|
$PHPMAILER_LANG = array(); //Language strings get put in here
|
||||||
|
include $fileInfo->getPathname(); //Get language strings
|
||||||
|
$missing = array_diff(array_keys($definedStrings), array_keys($PHPMAILER_LANG));
|
||||||
|
$extra = array_diff(array_keys($PHPMAILER_LANG), array_keys($definedStrings));
|
||||||
|
if (!empty($missing)) {
|
||||||
|
$err .= "\nMissing translations in $lang: " . implode(', ', $missing);
|
||||||
|
}
|
||||||
|
if (!empty($extra)) {
|
||||||
|
$err .= "\nExtra translations in $lang: " . implode(', ', $extra);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->assertEmpty($err, $err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a sample form for setting appropriate test values through a browser
|
||||||
|
* These values can also be set using a file called testbootstrap.php (not in svn) in the same folder as this script
|
||||||
|
* which is probably more useful if you run these tests a lot
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<h3>phpmailer Unit Test</h3>
|
||||||
|
By entering a SMTP hostname it will automatically perform tests with SMTP.
|
||||||
|
|
||||||
|
<form name="phpmailer_unit" action=__FILE__ method="get">
|
||||||
|
<input type="hidden" name="submitted" value="1"/>
|
||||||
|
From Address: <input type="text" size="50" name="mail_from" value="<?php echo get("mail_from"); ?>"/>
|
||||||
|
<br/>
|
||||||
|
To Address: <input type="text" size="50" name="mail_to" value="<?php echo get("mail_to"); ?>"/>
|
||||||
|
<br/>
|
||||||
|
Cc Address: <input type="text" size="50" name="mail_cc" value="<?php echo get("mail_cc"); ?>"/>
|
||||||
|
<br/>
|
||||||
|
SMTP Hostname: <input type="text" size="50" name="mail_host" value="<?php echo get("mail_host"); ?>"/>
|
||||||
|
<p/>
|
||||||
|
<input type="submit" value="Run Test"/>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
*/
|
||||||
1185
phpmailer/test/phpmailerTest.php
Normal file
1185
phpmailer/test/phpmailerTest.php
Normal file
File diff suppressed because it is too large
Load Diff
BIN
phpmailer/test/test.png
Normal file
BIN
phpmailer/test/test.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
84
phpmailer/test/test_callback.php
Normal file
84
phpmailer/test/test_callback.php
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>PHPMailer Lite - DKIM and Callback Function test</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
/* This is a sample callback function for PHPMailer Lite.
|
||||||
|
* This callback function will echo the results of PHPMailer processing.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Callback (action) function
|
||||||
|
* bool $result result of the send action
|
||||||
|
* string $to email address of the recipient
|
||||||
|
* string $cc cc email addresses
|
||||||
|
* string $bcc bcc email addresses
|
||||||
|
* string $subject the subject
|
||||||
|
* string $body the email body
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
function callbackAction ($result, $to, $cc, $bcc, $subject, $body) {
|
||||||
|
/*
|
||||||
|
this callback example echos the results to the screen - implement to
|
||||||
|
post to databases, build CSV log files, etc., with minor changes
|
||||||
|
*/
|
||||||
|
$to = cleanEmails($to,'to');
|
||||||
|
$cc = cleanEmails($cc[0],'cc');
|
||||||
|
$bcc = cleanEmails($bcc[0],'cc');
|
||||||
|
echo $result . "\tTo: " . $to['Name'] . "\tTo: " . $to['Email'] . "\tCc: " . $cc['Name'] . "\tCc: " . $cc['Email'] . "\tBcc: " . $bcc['Name'] . "\tBcc: " . $bcc['Email'] . "\t" . $subject . "<br />\n";
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$testLite = false;
|
||||||
|
|
||||||
|
if ($testLite) {
|
||||||
|
require_once '../class.phpmailer-lite.php';
|
||||||
|
$mail = new PHPMailerLite();
|
||||||
|
} else {
|
||||||
|
require_once '../class.phpmailer.php';
|
||||||
|
$mail = new PHPMailer();
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$mail->IsMail(); // telling the class to use SMTP
|
||||||
|
$mail->SetFrom('you@yourdomain.com', 'Your Name');
|
||||||
|
$mail->AddAddress('another@yourdomain.com', 'John Doe');
|
||||||
|
$mail->Subject = 'PHPMailer Lite Test Subject via Mail()';
|
||||||
|
$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
|
||||||
|
$mail->MsgHTML(file_get_contents('contents.html'));
|
||||||
|
$mail->AddAttachment('images/phpmailer.gif'); // attachment
|
||||||
|
$mail->AddAttachment('images/phpmailer_mini.gif'); // attachment
|
||||||
|
$mail->action_function = 'callbackAction';
|
||||||
|
$mail->Send();
|
||||||
|
echo "Message Sent OK</p>\n";
|
||||||
|
} catch (phpmailerException $e) {
|
||||||
|
echo $e->errorMessage(); //Pretty error messages from PHPMailer
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo $e->getMessage(); //Boring error messages from anything else!
|
||||||
|
}
|
||||||
|
|
||||||
|
function cleanEmails($str,$type) {
|
||||||
|
if ($type == 'cc') {
|
||||||
|
$addy['Email'] = $str[0];
|
||||||
|
$addy['Name'] = $str[1];
|
||||||
|
return $addy;
|
||||||
|
}
|
||||||
|
if (!strstr($str, ' <')) {
|
||||||
|
$addy['Name'] = '';
|
||||||
|
$addy['Email'] = $addy;
|
||||||
|
return $addy;
|
||||||
|
}
|
||||||
|
$addyArr = explode(' <', $str);
|
||||||
|
if (substr($addyArr[1],-1) == '>') {
|
||||||
|
$addyArr[1] = substr($addyArr[1],0,-1);
|
||||||
|
}
|
||||||
|
$addy['Name'] = $addyArr[0];
|
||||||
|
$addy['Email'] = $addyArr[1];
|
||||||
|
$addy['Email'] = str_replace('@', '@', $addy['Email']);
|
||||||
|
return $addy;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
7
phpmailer/test/testbootstrap-dist.php
Normal file
7
phpmailer/test/testbootstrap-dist.php
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
$_REQUEST['submitted'] = 1;
|
||||||
|
$_REQUEST['mail_to'] = 'somebody@example.com';
|
||||||
|
$_REQUEST['mail_from'] = 'phpunit@example.com';
|
||||||
|
$_REQUEST['mail_cc'] = 'cc@example.com';
|
||||||
|
$_REQUEST['mail_host'] = 'localhost';
|
||||||
|
$_REQUEST['mail_port'] = 2500;
|
||||||
48
phpmailer/test/testemail.php
Normal file
48
phpmailer/test/testemail.php
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Simple example script using PHPMailer with exceptions enabled
|
||||||
|
* @package phpmailer
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
require '../class.phpmailer.php';
|
||||||
|
|
||||||
|
try {
|
||||||
|
$mail = new PHPMailer(true); //New instance, with exceptions enabled
|
||||||
|
|
||||||
|
$body = file_get_contents('contents.html');
|
||||||
|
$body = preg_replace('/\\\\/','', $body); //Strip backslashes
|
||||||
|
|
||||||
|
$mail->IsSMTP(); // tell the class to use SMTP
|
||||||
|
$mail->SMTPAuth = true; // enable SMTP authentication
|
||||||
|
$mail->Port = 25; // set the SMTP server port
|
||||||
|
$mail->Host = "mail.yourdomain.com"; // SMTP server
|
||||||
|
$mail->Username = "name@domain.com"; // SMTP server username
|
||||||
|
$mail->Password = "password"; // SMTP server password
|
||||||
|
|
||||||
|
$mail->IsSendmail(); // tell the class to use Sendmail
|
||||||
|
|
||||||
|
$mail->AddReplyTo("name@domain.com","First Last");
|
||||||
|
|
||||||
|
$mail->From = "name@domain.com";
|
||||||
|
$mail->FromName = "First Last";
|
||||||
|
|
||||||
|
$to = "someone@example...com";
|
||||||
|
|
||||||
|
$mail->AddAddress($to);
|
||||||
|
|
||||||
|
$mail->Subject = "First PHPMailer Message";
|
||||||
|
|
||||||
|
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
|
||||||
|
$mail->WordWrap = 80; // set word wrap
|
||||||
|
|
||||||
|
$mail->MsgHTML($body);
|
||||||
|
|
||||||
|
$mail->IsHTML(true); // send as HTML
|
||||||
|
|
||||||
|
$mail->Send();
|
||||||
|
echo 'Message has been sent.';
|
||||||
|
} catch (phpmailerException $e) {
|
||||||
|
echo $e->errorMessage();
|
||||||
|
}
|
||||||
|
?>
|
||||||
165
phpmailer/test_script/LGPLv3.txt
Normal file
165
phpmailer/test_script/LGPLv3.txt
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
||||||
|
This version of the GNU Lesser General Public License incorporates
|
||||||
|
the terms and conditions of version 3 of the GNU General Public
|
||||||
|
License, supplemented by the additional permissions listed below.
|
||||||
|
|
||||||
|
0. Additional Definitions.
|
||||||
|
|
||||||
|
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||||
|
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||||
|
General Public License.
|
||||||
|
|
||||||
|
"The Library" refers to a covered work governed by this License,
|
||||||
|
other than an Application or a Combined Work as defined below.
|
||||||
|
|
||||||
|
An "Application" is any work that makes use of an interface provided
|
||||||
|
by the Library, but which is not otherwise based on the Library.
|
||||||
|
Defining a subclass of a class defined by the Library is deemed a mode
|
||||||
|
of using an interface provided by the Library.
|
||||||
|
|
||||||
|
A "Combined Work" is a work produced by combining or linking an
|
||||||
|
Application with the Library. The particular version of the Library
|
||||||
|
with which the Combined Work was made is also called the "Linked
|
||||||
|
Version".
|
||||||
|
|
||||||
|
The "Minimal Corresponding Source" for a Combined Work means the
|
||||||
|
Corresponding Source for the Combined Work, excluding any source code
|
||||||
|
for portions of the Combined Work that, considered in isolation, are
|
||||||
|
based on the Application, and not on the Linked Version.
|
||||||
|
|
||||||
|
The "Corresponding Application Code" for a Combined Work means the
|
||||||
|
object code and/or source code for the Application, including any data
|
||||||
|
and utility programs needed for reproducing the Combined Work from the
|
||||||
|
Application, but excluding the System Libraries of the Combined Work.
|
||||||
|
|
||||||
|
1. Exception to Section 3 of the GNU GPL.
|
||||||
|
|
||||||
|
You may convey a covered work under sections 3 and 4 of this License
|
||||||
|
without being bound by section 3 of the GNU GPL.
|
||||||
|
|
||||||
|
2. Conveying Modified Versions.
|
||||||
|
|
||||||
|
If you modify a copy of the Library, and, in your modifications, a
|
||||||
|
facility refers to a function or data to be supplied by an Application
|
||||||
|
that uses the facility (other than as an argument passed when the
|
||||||
|
facility is invoked), then you may convey a copy of the modified
|
||||||
|
version:
|
||||||
|
|
||||||
|
a) under this License, provided that you make a good faith effort to
|
||||||
|
ensure that, in the event an Application does not supply the
|
||||||
|
function or data, the facility still operates, and performs
|
||||||
|
whatever part of its purpose remains meaningful, or
|
||||||
|
|
||||||
|
b) under the GNU GPL, with none of the additional permissions of
|
||||||
|
this License applicable to that copy.
|
||||||
|
|
||||||
|
3. Object Code Incorporating Material from Library Header Files.
|
||||||
|
|
||||||
|
The object code form of an Application may incorporate material from
|
||||||
|
a header file that is part of the Library. You may convey such object
|
||||||
|
code under terms of your choice, provided that, if the incorporated
|
||||||
|
material is not limited to numerical parameters, data structure
|
||||||
|
layouts and accessors, or small macros, inline functions and templates
|
||||||
|
(ten or fewer lines in length), you do both of the following:
|
||||||
|
|
||||||
|
a) Give prominent notice with each copy of the object code that the
|
||||||
|
Library is used in it and that the Library and its use are
|
||||||
|
covered by this License.
|
||||||
|
|
||||||
|
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||||
|
document.
|
||||||
|
|
||||||
|
4. Combined Works.
|
||||||
|
|
||||||
|
You may convey a Combined Work under terms of your choice that,
|
||||||
|
taken together, effectively do not restrict modification of the
|
||||||
|
portions of the Library contained in the Combined Work and reverse
|
||||||
|
engineering for debugging such modifications, if you also do each of
|
||||||
|
the following:
|
||||||
|
|
||||||
|
a) Give prominent notice with each copy of the Combined Work that
|
||||||
|
the Library is used in it and that the Library and its use are
|
||||||
|
covered by this License.
|
||||||
|
|
||||||
|
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||||
|
document.
|
||||||
|
|
||||||
|
c) For a Combined Work that displays copyright notices during
|
||||||
|
execution, include the copyright notice for the Library among
|
||||||
|
these notices, as well as a reference directing the user to the
|
||||||
|
copies of the GNU GPL and this license document.
|
||||||
|
|
||||||
|
d) Do one of the following:
|
||||||
|
|
||||||
|
0) Convey the Minimal Corresponding Source under the terms of this
|
||||||
|
License, and the Corresponding Application Code in a form
|
||||||
|
suitable for, and under terms that permit, the user to
|
||||||
|
recombine or relink the Application with a modified version of
|
||||||
|
the Linked Version to produce a modified Combined Work, in the
|
||||||
|
manner specified by section 6 of the GNU GPL for conveying
|
||||||
|
Corresponding Source.
|
||||||
|
|
||||||
|
1) Use a suitable shared library mechanism for linking with the
|
||||||
|
Library. A suitable mechanism is one that (a) uses at run time
|
||||||
|
a copy of the Library already present on the user's computer
|
||||||
|
system, and (b) will operate properly with a modified version
|
||||||
|
of the Library that is interface-compatible with the Linked
|
||||||
|
Version.
|
||||||
|
|
||||||
|
e) Provide Installation Information, but only if you would otherwise
|
||||||
|
be required to provide such information under section 6 of the
|
||||||
|
GNU GPL, and only to the extent that such information is
|
||||||
|
necessary to install and execute a modified version of the
|
||||||
|
Combined Work produced by recombining or relinking the
|
||||||
|
Application with a modified version of the Linked Version. (If
|
||||||
|
you use option 4d0, the Installation Information must accompany
|
||||||
|
the Minimal Corresponding Source and Corresponding Application
|
||||||
|
Code. If you use option 4d1, you must provide the Installation
|
||||||
|
Information in the manner specified by section 6 of the GNU GPL
|
||||||
|
for conveying Corresponding Source.)
|
||||||
|
|
||||||
|
5. Combined Libraries.
|
||||||
|
|
||||||
|
You may place library facilities that are a work based on the
|
||||||
|
Library side by side in a single library together with other library
|
||||||
|
facilities that are not Applications and are not covered by this
|
||||||
|
License, and convey such a combined library under terms of your
|
||||||
|
choice, if you do both of the following:
|
||||||
|
|
||||||
|
a) Accompany the combined library with a copy of the same work based
|
||||||
|
on the Library, uncombined with any other library facilities,
|
||||||
|
conveyed under the terms of this License.
|
||||||
|
|
||||||
|
b) Give prominent notice with the combined library that part of it
|
||||||
|
is a work based on the Library, and explaining where to find the
|
||||||
|
accompanying uncombined form of the same work.
|
||||||
|
|
||||||
|
6. Revised Versions of the GNU Lesser General Public License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the GNU Lesser General Public License from time to time. Such new
|
||||||
|
versions will be similar in spirit to the present version, but may
|
||||||
|
differ in detail to address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Library as you received it specifies that a certain numbered version
|
||||||
|
of the GNU Lesser General Public License "or any later version"
|
||||||
|
applies to it, you have the option of following the terms and
|
||||||
|
conditions either of that published version or of any later version
|
||||||
|
published by the Free Software Foundation. If the Library as you
|
||||||
|
received it does not specify a version number of the GNU Lesser
|
||||||
|
General Public License, you may choose any version of the GNU Lesser
|
||||||
|
General Public License ever published by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Library as you received it specifies that a proxy can decide
|
||||||
|
whether future versions of the GNU Lesser General Public License shall
|
||||||
|
apply, that proxy's public statement of acceptance of any version is
|
||||||
|
permanent authorization for you to choose that version for the
|
||||||
|
Library.
|
||||||
12
phpmailer/test_script/contents.html
Normal file
12
phpmailer/test_script/contents.html
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<body>
|
||||||
|
<div style="width: 640px; font-family: Arial, Helvetica, sans-serif; font-size: 11px;">
|
||||||
|
<div align="center">
|
||||||
|
<img src="phpmailer.gif" style="height: 90px; width: 340px">
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<p>This is a test of PHPMailer v5.0.0 for PHP5/6.</p>
|
||||||
|
<p>This particular example uses <strong>HTML</strong>, with a <div> tag and inline styles.</p>
|
||||||
|
<p>Also note the use of the PHPMailer at the top with no specific code to handle including it in the body of the email.</p>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
BIN
phpmailer/test_script/images/aikido.gif
Normal file
BIN
phpmailer/test_script/images/aikido.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
BIN
phpmailer/test_script/images/bkgrnd.gif
Normal file
BIN
phpmailer/test_script/images/bkgrnd.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 49 B |
BIN
phpmailer/test_script/images/phpmailer.gif
Normal file
BIN
phpmailer/test_script/images/phpmailer.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
557
phpmailer/test_script/index.php
Normal file
557
phpmailer/test_script/index.php
Normal file
@@ -0,0 +1,557 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* revised, updated and corrected 27/02/2013
|
||||||
|
* by matt.sturdy@gmail.com
|
||||||
|
*/
|
||||||
|
require_once("../class.phpmailer.php");
|
||||||
|
|
||||||
|
//This class from http://www.chuggnutt.com/html2text
|
||||||
|
require_once('../extras/class.html2text.php');
|
||||||
|
|
||||||
|
$CFG['smtp_debug'] = 1;
|
||||||
|
$CFG['smtp_server'] = 'mail.yourserver.com';
|
||||||
|
$CFG['smtp_port'] = '25';
|
||||||
|
$CFG['smtp_authenticate'] = 'true';
|
||||||
|
$CFG['smtp_username'] = 'name@yourserver.com';
|
||||||
|
$CFG['smtp_password'] = 'yourpassword';
|
||||||
|
$CFG['smtp_secure'] = 'None';
|
||||||
|
|
||||||
|
$from_name = ( isset($_POST['From_Name'])) ? $_POST['From_Name'] : '';
|
||||||
|
$from_email = ( isset($_POST['From_Email'])) ? $_POST['From_Email'] : '';
|
||||||
|
$to_name = ( isset($_POST['To_Name'])) ? $_POST['To_Name'] : '';
|
||||||
|
$to_email = ( isset($_POST['To_Email'])) ? $_POST['To_Email'] : '';
|
||||||
|
$cc_email = ( isset($_POST['cc_Email'])) ? $_POST['cc_Email'] : '';
|
||||||
|
$bcc_email = ( isset($_POST['bcc_Email'])) ? $_POST['bcc_Email'] : '';
|
||||||
|
$subject = ( isset($_POST['Subject'])) ? $_POST['Subject'] : '';
|
||||||
|
$message = ( isset($_POST['Message'])) ? $_POST['Message'] : '';
|
||||||
|
$test_type = ( isset($_POST['test_type'])) ? $_POST['test_type'] : '';
|
||||||
|
$smtp_debug = ( isset($_POST['smtp_debug'])) ? $_POST['smtp_debug'] : $CFG['smtp_debug'];
|
||||||
|
$smtp_server = ( isset($_POST['smtp_server'])) ? $_POST['smtp_server'] : $CFG['smtp_server'];
|
||||||
|
$smtp_port = ( isset($_POST['smtp_port'])) ? $_POST['smtp_port'] : $CFG['smtp_port'];
|
||||||
|
$smtp_secure = strtolower(( isset($_POST['smtp_secure'])) ? $_POST['smtp_secure'] : $CFG['smtp_secure']);
|
||||||
|
$smtp_authenticate = ( isset($_POST['smtp_authenticate'])) ? $_POST['smtp_authenticate'] : $CFG['smtp_authenticate'];
|
||||||
|
$authenticate_password = ( isset($_POST['authenticate_password'])) ? $_POST['authenticate_password'] : $CFG['smtp_password'];
|
||||||
|
$authenticate_username = ( isset($_POST['authenticate_username'])) ? $_POST['authenticate_username'] : $CFG['smtp_username'];
|
||||||
|
|
||||||
|
|
||||||
|
// storing all status output from the script to be shown to the user later
|
||||||
|
$results_messages = array();
|
||||||
|
$errorMsg = array();
|
||||||
|
|
||||||
|
// $example_code represents the "final code" that we're using, and will
|
||||||
|
// be shown to the user at the end.
|
||||||
|
$example_code = "\nrequire_once(\"../class.phpmailer.php\");";
|
||||||
|
$example_code .= "\nrequire_once(\"../extras/class.html2text.php\");";
|
||||||
|
$example_code .= "\n\n\$results_messages = new array();";
|
||||||
|
|
||||||
|
class phpmailerAppException extends Exception {
|
||||||
|
public function errorMessage() {
|
||||||
|
$errorMsg = $this->getMessage();
|
||||||
|
return $errorMsg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$example_code .= "\n\nclass phpmailerAppException extends Exception {";
|
||||||
|
$example_code .= "\n public function errorMessage() {";
|
||||||
|
$example_code .= "\n \$errorMsg = \$this->getMessage();";
|
||||||
|
$example_code .= "\n return \$errorMsg;";
|
||||||
|
$example_code .= "\n }";
|
||||||
|
$example_code .= "\n}";
|
||||||
|
|
||||||
|
|
||||||
|
if ( isset($_POST["submit"]) && $_POST['submit'] == "Submit" ) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
$to = $_POST['To_Email'];
|
||||||
|
if(filter_var($to, FILTER_VALIDATE_EMAIL) === FALSE) {
|
||||||
|
throw new phpmailerAppException("Email address " . $to . " is invalid -- aborting!<br />");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (phpmailerAppException $e) {
|
||||||
|
$results_messages[] = $e->errorMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
$example_code .= "\n\ntry {";
|
||||||
|
$example_code .= "\n \$to = \$_POST[\"To_Email\"];";
|
||||||
|
$example_code .= "\n if(filter_var(\$to, FILTER_VALIDATE_EMAIL) === FALSE) {";
|
||||||
|
$example_code .= "\n throw new phpmailerAppException(\"Email address \" . \$to . \" is invalid -- aborting!<br />\");";
|
||||||
|
$example_code .= "\n }";
|
||||||
|
$example_code .= "\n}";
|
||||||
|
$example_code .= "\ncatch (phpmailerAppException \$e) {";
|
||||||
|
$example_code .= "\n \$results_messages[] = \$e->errorMessage()";
|
||||||
|
$example_code .= "\n}";
|
||||||
|
|
||||||
|
$mail = new PHPMailer();
|
||||||
|
$example_code .= "\n\n\$mail = new PHPMailer();";
|
||||||
|
|
||||||
|
if ( $_POST['test_type'] == "smtp" ) {
|
||||||
|
$mail->IsSMTP(); // telling the class to use SMTP
|
||||||
|
$mail->SMTPDebug = $_POST['smtp_debug'];
|
||||||
|
$mail->Host = $_POST['smtp_server']; // SMTP server
|
||||||
|
$mail->Port = $_POST['smtp_port']; // set the SMTP port
|
||||||
|
if ($_POST['smtp_secure']) {
|
||||||
|
$mail->SMTPSecure = strtolower($_POST['smtp_secure']);
|
||||||
|
}
|
||||||
|
$mail->SMTPAuth = $_POST['smtp_authenticate']; // enable SMTP authentication
|
||||||
|
if ($_POST['smtp_authenticate']) {
|
||||||
|
$mail->Username = $_POST['authenticate_username']; // SMTP account username
|
||||||
|
$mail->Password = $_POST['authenticate_password']; // SMTP account password
|
||||||
|
}
|
||||||
|
|
||||||
|
$example_code .= "\n\$mail->IsSMTP();";
|
||||||
|
$example_code .= "\n\$mail->SMTPDebug = \"".$_POST['smtp_debug']."\";";
|
||||||
|
$example_code .= "\n\$mail->Host = \"".$_POST['smtp_server']."\";";
|
||||||
|
$example_code .= "\n\$mail->Port = \"".$_POST['smtp_port']."\";";
|
||||||
|
$example_code .= "\n\$mail->SMTPSecure = \"".strtolower($_POST['smtp_secure'])."\";";
|
||||||
|
$example_code .= "\n\$mail->SMTPAuth = \"".$_POST['smtp_authenticate']."\";";
|
||||||
|
if ($_POST['smtp_authenticate']) {
|
||||||
|
$example_code .= "\n\$mail->Username = \"".$_POST['authenticate_username']."\";";
|
||||||
|
$example_code .= "\n\$mail->Password = \"".$_POST['authenticate_password']."\";";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
elseif ( $_POST['test_type'] == "mail" ) {
|
||||||
|
$mail->IsMail(); // telling the class to use PHP's Mail()
|
||||||
|
$example_code .= "\n\$mail->IsMail();";
|
||||||
|
}
|
||||||
|
elseif ( $_POST['test_type'] == "sendmail" ) {
|
||||||
|
$mail->IsSendmail(); // telling the class to use Sendmail
|
||||||
|
$example_code .= "\n\$mail->IsSendmail();";
|
||||||
|
}
|
||||||
|
elseif ( $_POST['test_type'] == "qmail" ) {
|
||||||
|
$mail->IsQmail(); // telling the class to use Qmail
|
||||||
|
$example_code .= "\n\$mail->IsQmail();";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $_POST['From_Name'] != '' ) {
|
||||||
|
$mail->AddReplyTo($_POST['From_Email'],$_POST['From_Name']);
|
||||||
|
$mail->From = $_POST['From_Email'];
|
||||||
|
$mail->FromName = $_POST['From_Name'];
|
||||||
|
|
||||||
|
$example_code .= "\n\$mail->AddReplyTo(\"".$_POST['From_Email']."\",\"".$_POST['From_Name']."\");";
|
||||||
|
$example_code .= "\n\$mail->From = \"".$_POST['From_Email']."\");";
|
||||||
|
$example_code .= "\n\$mail->FromName = \"".$_POST['From_Name']."\");";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$mail->AddReplyTo($_POST['From_Email']);
|
||||||
|
$mail->From = $_POST['From_Email'];
|
||||||
|
$mail->FromName = $_POST['From_Email'];
|
||||||
|
|
||||||
|
$example_code .= "\n\$mail->AddReplyTo(\"".$_POST['From_Email']."\");";
|
||||||
|
$example_code .= "\n\$mail->From = \"".$_POST['From_Email']."\";";
|
||||||
|
$example_code .= "\n\$mail->FromName = \"".$_POST['From_Email']."\";";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $_POST['To_Name'] != '' ) {
|
||||||
|
$mail->AddAddress($to,$_POST['To_Name']);
|
||||||
|
$example_code .= "\n\$mail->AddAddress(\"$to\",\"".$_POST['To_Name']."\");";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$mail->AddAddress($to);
|
||||||
|
$example_code .= "\n\$mail->AddAddress(\"$to\");";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $_POST['bcc_Email'] != '' ) {
|
||||||
|
$indiBCC = explode(" ", $_POST['bcc_Email']);
|
||||||
|
foreach ($indiBCC as $key => $value) {
|
||||||
|
$mail->AddBCC($value);
|
||||||
|
$example_code .= "\n\$mail->AddBCC(\"$value\");";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $_POST['cc_Email'] != '' ) {
|
||||||
|
$indiCC = explode(" ", $_POST['cc_Email']);
|
||||||
|
foreach ($indiCC as $key => $value) {
|
||||||
|
$mail->AddCC($value);
|
||||||
|
$example_code .= "\n\$mail->AddCC(\"$value\");";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$mail->Subject = $_POST['Subject'] . ' (PHPMailer test using ' . strtoupper($_POST['test_type']) . ')';
|
||||||
|
$example_code .= "\n\$mail->Subject = \"".$_POST['Subject'].'(PHPMailer test using ' . strtoupper($_POST['test_type']) . ')";';
|
||||||
|
|
||||||
|
if ( $_POST['Message'] == '' ) {
|
||||||
|
$body = file_get_contents('contents.html');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$body = $_POST['Message'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$example_code .= "\n\$body = \"".$body.'";';
|
||||||
|
|
||||||
|
$mail->WordWrap = 80; // set word wrap
|
||||||
|
$mail->IsHTML(true); // send as HTML
|
||||||
|
$mail->Body = $body;
|
||||||
|
|
||||||
|
$example_code .= "\n\$mail->WordWrap = 80;";
|
||||||
|
$example_code .= "\n\$mail->IsHTML(true); // send as HTML";
|
||||||
|
$example_code .= "\n\$mail->Body = \"$body\";";
|
||||||
|
|
||||||
|
// for non-HTML mail clients
|
||||||
|
$h2t = new html2text($body);
|
||||||
|
$mail->AltBody = $h2t->get_text();
|
||||||
|
$example_code .= "\n\$h2t =& new html2text(\$body);";
|
||||||
|
$example_code .= "\n\$mail->AltBody = \$h2t->get_text();";
|
||||||
|
|
||||||
|
$mail->AddAttachment("images/aikido.gif", "aikido.gif"); // optional name
|
||||||
|
$mail->AddAttachment("images/phpmailer.gif", "phpmailer.gif"); // optional name
|
||||||
|
$example_code .= "\n\$mail->AddAttachment(\"images/aikido.gif\", \"aikido.gif\"); // optional name";
|
||||||
|
$example_code .= "\n\$mail->AddAttachment(\"images/phpmailer.gif\", \"phpmailer.gif\"); // optional name";
|
||||||
|
|
||||||
|
try {
|
||||||
|
if ( !$mail->Send() ) {
|
||||||
|
$error = "Unable to send to: " . $to . "<br />";
|
||||||
|
throw new phpmailerAppException($error);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$results_messages[] = "Message has been sent using " . strtoupper($_POST["test_type"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (phpmailerAppException $e) {
|
||||||
|
$errorMsg[] = $e->errorMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( count($errorMsg) > 0 ) {
|
||||||
|
foreach ($errorMsg as $key => $value) {
|
||||||
|
$thisError = $key + 1;
|
||||||
|
$results_messages[] = $thisError . ': ' . $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$example_code .= "\n\ntry {";
|
||||||
|
$example_code .= "\n if ( !\$mail->Send() ) {";
|
||||||
|
$example_code .= "\n \$error = \"Unable to send to: \" . \$to . \"<br />\";";
|
||||||
|
$example_code .= "\n throw new phpmailerAppException(\$error);";
|
||||||
|
$example_code .= "\n } ";
|
||||||
|
$example_code .= "\n else {";
|
||||||
|
$example_code .= "\n \$results_messages[] = \"Message has been sent using \" . strtoupper(\$_POST[\"test_type\"]);";
|
||||||
|
$example_code .= "\n }";
|
||||||
|
$example_code .= "\n}";
|
||||||
|
$example_code .= "\ncatch (phpmailerAppException \$e) {";
|
||||||
|
$example_code .= "\n \$errorMsg[] = \$e->errorMessage();";
|
||||||
|
$example_code .= "\n}";
|
||||||
|
$example_code .= "\n";
|
||||||
|
$example_code .= "\nif ( count(\$errorMsg) > 0 ) {";
|
||||||
|
$example_code .= "\n foreach (\$errorMsg as \$key => \$value) {";
|
||||||
|
$example_code .= "\n \$thisError = \$key + 1;";
|
||||||
|
$example_code .= "\n \$results_messages[] = \$thisError . \': \' . \$value;";
|
||||||
|
$example_code .= "\n }";
|
||||||
|
$example_code .= "\n}";
|
||||||
|
}
|
||||||
|
|
||||||
|
?><!DOCTYPE html>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
|
<title>PHPMailer Test Page</title>
|
||||||
|
<script type="text/javascript" src="scripts/shCore.js"></script>
|
||||||
|
<script type="text/javascript" src="scripts/shBrushPhp.js"></script>
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/shCore.css"/>
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/shThemeDefault.css"/>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
font-size: 1em;
|
||||||
|
padding: 1em;
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
margin:0 auto;
|
||||||
|
border-spacing: 0;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
table.column {
|
||||||
|
border-collapse: collapse;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
padding: 0.5em;
|
||||||
|
width: 35em;
|
||||||
|
}
|
||||||
|
td {
|
||||||
|
font-size: 1em;
|
||||||
|
padding: 0.1em 0.25em;
|
||||||
|
-moz-border-radius: 1em;
|
||||||
|
-webkit-border-radius: 1em;
|
||||||
|
border-radius: 1em;
|
||||||
|
}
|
||||||
|
td.colleft {
|
||||||
|
text-align: right;
|
||||||
|
width: 35%;
|
||||||
|
}
|
||||||
|
td.colrite {
|
||||||
|
text-align: left;
|
||||||
|
width: 65%;
|
||||||
|
}
|
||||||
|
fieldset {
|
||||||
|
padding: 1em 1em 1em 1em;
|
||||||
|
margin: 0 2em ;
|
||||||
|
border-radius: 1.5em;
|
||||||
|
-webkit-border-radius: 1em;
|
||||||
|
-moz-border-radius: 1em;
|
||||||
|
}
|
||||||
|
fieldset.inner {
|
||||||
|
width:40%;
|
||||||
|
}
|
||||||
|
fieldset:hover, tr:hover {
|
||||||
|
background-color: #fafafa;
|
||||||
|
}
|
||||||
|
legend {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 1.1em;
|
||||||
|
}
|
||||||
|
div.column-left {
|
||||||
|
float:left;
|
||||||
|
width:45em;
|
||||||
|
height:31em;
|
||||||
|
}
|
||||||
|
div.column-right {
|
||||||
|
display:inline;
|
||||||
|
width:45em;
|
||||||
|
max-height:31em;
|
||||||
|
}
|
||||||
|
input.radio {
|
||||||
|
float:left;
|
||||||
|
}
|
||||||
|
div.radio {
|
||||||
|
padding: 0.2em;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
SyntaxHighlighter.config.clipboardSwf = 'scripts/clipboard.swf';
|
||||||
|
SyntaxHighlighter.all();
|
||||||
|
|
||||||
|
function startAgain() {
|
||||||
|
var post_params = {
|
||||||
|
"From_Name" : "<?php echo $from_name; ?>",
|
||||||
|
"From_Email": "<?php echo $from_email; ?>",
|
||||||
|
"To_Name" : "<?php echo $to_name; ?>",
|
||||||
|
"To_Email" : "<?php echo $to_email; ?>",
|
||||||
|
"cc_Email" : "<?php echo $cc_email; ?>",
|
||||||
|
"bcc_Email" : "<?php echo $bcc_email; ?>",
|
||||||
|
"Subject" : "<?php echo $subject; ?>",
|
||||||
|
"Message" : "<?php echo $message; ?>",
|
||||||
|
"test_type" : "<?php echo $test_type; ?>",
|
||||||
|
"smtp_debug": "<?php echo $smtp_debug; ?>",
|
||||||
|
"smtp_server": "<?php echo $smtp_server; ?>",
|
||||||
|
"smtp_port" : "<?php echo $smtp_port; ?>",
|
||||||
|
"smtp_secure": "<?php echo $smtp_secure; ?>",
|
||||||
|
"smtp_authenticate": "<?php echo $smtp_authenticate; ?>",
|
||||||
|
"authenticate_username": "<?php echo $authenticate_username; ?>",
|
||||||
|
"authenticate_password": "<?php echo $authenticate_password; ?>"
|
||||||
|
};
|
||||||
|
|
||||||
|
var resetForm = document.createElement("form");
|
||||||
|
resetForm.setAttribute("method", "POST");
|
||||||
|
resetForm.setAttribute("path", "index.php");
|
||||||
|
|
||||||
|
for(var k in post_params) {
|
||||||
|
var h = document.createElement("input");
|
||||||
|
h.setAttribute("type", "hidden");
|
||||||
|
h.setAttribute("name", k);
|
||||||
|
h.setAttribute("value", post_params[k]);
|
||||||
|
resetForm.appendChild(h);
|
||||||
|
}
|
||||||
|
|
||||||
|
document.body.appendChild(resetForm);
|
||||||
|
resetForm.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function showHideDiv(test, element_id) {
|
||||||
|
var ops = {"smtp-options-table" : "smtp"};
|
||||||
|
|
||||||
|
if (test == ops[element_id]) {
|
||||||
|
document.getElementById(element_id).style.display="block";
|
||||||
|
} else {
|
||||||
|
document.getElementById(element_id).style.display="none";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<?php
|
||||||
|
if ( substr(phpversion(),0,1) < 5 ) {
|
||||||
|
echo 'Current PHP version: ' . phpversion() . "<br />";
|
||||||
|
echo exit("ERROR: Wrong PHP version. Must be PHP 5 or above.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($results_messages) > 0) {
|
||||||
|
foreach ($results_messages as $result) {
|
||||||
|
echo "<div>$result</div>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") {
|
||||||
|
echo "<button type=\"submit\" onclick=\"startAgain();\">Start Over</button><br/>\n";
|
||||||
|
echo "<br/><span>Script:</span>\n";
|
||||||
|
echo "<pre class=\"brush: php;\">\n";
|
||||||
|
echo $example_code;
|
||||||
|
echo "\n</pre>\n";
|
||||||
|
echo "\n<hr style=\"margin: 3em;\">\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<form method="POST" enctype="multipart/form-data">
|
||||||
|
<div>
|
||||||
|
<div class="column-left">
|
||||||
|
<fieldset>
|
||||||
|
<legend>Mail Details</legend>
|
||||||
|
<table border="1" class="column">
|
||||||
|
<tr>
|
||||||
|
<td class="colleft">
|
||||||
|
<label for="From_Name"><strong>From</strong> Name</label>
|
||||||
|
</td>
|
||||||
|
<td class="colrite">
|
||||||
|
<input type="text" id="From_Name" name="From_Name" value="<?php echo $from_name; ?>" style="width:95%;" autofocus placeholder="Your Name">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="colleft">
|
||||||
|
<label for="From_Email"><strong>From</strong> Email Address</label>
|
||||||
|
</td>
|
||||||
|
<td class="colrite">
|
||||||
|
<input type="text" id="From_Email" name="From_Email" value="<?php echo $from_email; ?>" style="width:95%;" required placeholder="Your.Email@domain.com">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="colleft">
|
||||||
|
<label for="To_Name"><strong>To</strong> Name</label>
|
||||||
|
</td>
|
||||||
|
<td class="colrite">
|
||||||
|
<input type="text" id="To_Name" name="To_Name" value="<?php echo $to_name; ?>" style="width:95%;" placeholder="Recipient's Name">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="colleft">
|
||||||
|
<label for="To_Email"><strong>To</strong> Email Address</label>
|
||||||
|
</td>
|
||||||
|
<td class="colrite">
|
||||||
|
<input type="text" id="To_Email" name="To_Email" value="<?php echo $to_email; ?>" style="width:95%;" required placeholder="Recipients.Email@domain.com">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="colleft">
|
||||||
|
<label for="cc_Email"><strong>CC Recipients</strong><br/><small>(separate with commas)</small></label>
|
||||||
|
</td>
|
||||||
|
<td class="colrite">
|
||||||
|
<input type="text" id="cc_Email" name="cc_Email" value="<?php echo $cc_email; ?>" style="width:95%;" placeholder="cc1@domain.com, cc2@domain.com">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="colleft">
|
||||||
|
<label for="bcc_Email"><strong>BCC Recipients</strong><br/><small>(separate with commas)</small></label>
|
||||||
|
</td>
|
||||||
|
<td class="colrite">
|
||||||
|
<input type="text" id="bcc_Email" name="bcc_Email" value="<?php echo $bcc_email; ?>" style="width:95%;" placeholder="bcc1@domain.com, bcc2@domain.com">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="colleft">
|
||||||
|
<label for="Subject"><strong>Subject</strong></label>
|
||||||
|
</td>
|
||||||
|
<td class="colrite">
|
||||||
|
<input type="text" name="Subject" id="Subject" value="<?php echo $subject; ?>" style="width:95%;" placeholder="Email Subject">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="colleft">
|
||||||
|
<label for="Message"><strong>Message</strong><br /><small>If blank, will use content.html</small></label>
|
||||||
|
</td>
|
||||||
|
<td class="colrite">
|
||||||
|
<textarea name="Message" id="Message" style="width:95%;height:5em;" placeholder="Body of your email"><?php echo $message; ?></textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div style="margin:1em 0;">Test will include two attachments.</div>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
<div class="column-right">
|
||||||
|
<fieldset class="inner"> <!-- SELECT TYPE OF MAIL -->
|
||||||
|
<legend>Mail Test Specs</legend>
|
||||||
|
<table border="1" class="column">
|
||||||
|
<tr>
|
||||||
|
<td class="colleft">Test Type</td>
|
||||||
|
<td class="colrite">
|
||||||
|
<div class="radio">
|
||||||
|
<label for="radio-mail">Mail()</label>
|
||||||
|
<input class="radio" type="radio" name="test_type" value="mail" id="radio-mail" onclick="showHideDiv(this.value, 'smtp-options-table');" <?php echo ( $test_type == 'mail') ? 'checked' : ''; ?> required>
|
||||||
|
</div>
|
||||||
|
<div class="radio">
|
||||||
|
<label for="radio-sendmail">Sendmail</label>
|
||||||
|
<input class="radio" type="radio" name="test_type" value="sendmail" id="radio-sendmail" onclick="showHideDiv(this.value, 'smtp-options-table');" <?php echo ( $test_type == 'sendmail') ? 'checked' : ''; ?> required>
|
||||||
|
</div>
|
||||||
|
<div class="radio">
|
||||||
|
<label for="radio-qmail">Qmail</label>
|
||||||
|
<input class="radio" type="radio" name="test_type" value="qmail" id="radio-qmail" onclick="showHideDiv(this.value, 'smtp-options-table');" <?php echo ( $test_type == 'qmail') ? 'checked' : ''; ?> required>
|
||||||
|
</div>
|
||||||
|
<div class="radio">
|
||||||
|
<label for="radio-smtp">SMTP</label>
|
||||||
|
<input class="radio" type="radio" name="test_type" value="smtp" id="radio-smtp" onclick="showHideDiv(this.value, 'smtp-options-table');" <?php echo ( $test_type == 'smtp') ? 'checked' : ''; ?> required>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div id="smtp-options-table" style="margin:1em 0 0 0; <?php if($test_type != 'smtp') {echo "display: none;";}?>">
|
||||||
|
<span style="margin:1.25em 0; display:block;"><strong>SMTP Specific Options:</strong></span>
|
||||||
|
<table border="1" class="column">
|
||||||
|
<tr>
|
||||||
|
<td class="colleft"><label for="smtp_debug">SMTP Debug ?</label></td>
|
||||||
|
<td class="colrite">
|
||||||
|
<select size="1" id="smtp_debug" name="smtp_debug">
|
||||||
|
<option <?php echo ( $smtp_debug == '0') ? 'selected' : ''; ?> value="0">0 - Disabled</option>
|
||||||
|
<option <?php echo ( $smtp_debug == '1') ? 'selected' : ''; ?> value="1">1 - Errors and Messages</option>
|
||||||
|
<option <?php echo ( $smtp_debug == '2') ? 'selected' : ''; ?> value="2">2 - Messages only</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="colleft"><label for="smtp_server">SMTP Server</label></td>
|
||||||
|
<td class="colrite">
|
||||||
|
<input type="text" id="smtp_server" name="smtp_server" value="<?php echo $smtp_server; ?>" style="width:95%;" placeholder="smtp.server.com">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="colleft" style="width: 5em;"><label for="smtp_port">SMTP Port</label></td>
|
||||||
|
<td class="colrite">
|
||||||
|
<input type="text" name="smtp_port" id="smtp_port" size="3" value="<?php echo $smtp_port; ?>" placeholder="Port">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="colleft" ><label for="smtp_secure">SMTP Security</label></td>
|
||||||
|
<td>
|
||||||
|
<select size="1" name="smtp_secure" id="smtp_secure">
|
||||||
|
<option <?php echo ( $smtp_secure == 'none') ? 'selected' : ''?>>None</option>
|
||||||
|
<option <?php echo ( $smtp_secure == 'tls') ? 'selected' : ''?>>TLS</option>
|
||||||
|
<option <?php echo ( $smtp_secure == 'ssl') ? 'selected' : ''?>>SSL</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="colleft"><label for="smtp-authenticate">SMTP Authenticate?</label></td>
|
||||||
|
<td class="colrite">
|
||||||
|
<input type="checkbox" id="smtp-authenticate" name="smtp_authenticate" <?php if ($smtp_authenticate!=''){ echo "checked";} ?> value="<?php echo $smtp_authenticate; ?>">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="colleft"><label for="authenticate_username">Authenticate Username</label></td>
|
||||||
|
<td class="colrite">
|
||||||
|
<input type="text" id="authenticate_username" name="authenticate_username" value="<?php echo $authenticate_username; ?>" style="width:95%;" placeholder="SMTP Server Username">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="colleft"><label for="authenticate_password">Authenticate Password</label></td>
|
||||||
|
<td class="colrite">
|
||||||
|
<input type="password" name="authenticate_password" id="authenticate_password" value="<?php echo $authenticate_password; ?>" style="width:95%;" placeholder="SMTP Server Password">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
<br style="clear:both;">
|
||||||
|
<div style="margin-left:2em; margin-bottom:5em; float:left;">
|
||||||
|
<div style="margin-bottom: 1em; ">
|
||||||
|
<input type="submit" value="Submit" name="submit">
|
||||||
|
</div>
|
||||||
|
<?php echo 'Current PHP version: ' . phpversion(); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
BIN
phpmailer/test_script/scripts/clipboard.swf
Normal file
BIN
phpmailer/test_script/scripts/clipboard.swf
Normal file
Binary file not shown.
59
phpmailer/test_script/scripts/shBrushBash.js
vendored
Normal file
59
phpmailer/test_script/scripts/shBrushBash.js
vendored
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
/**
|
||||||
|
* SyntaxHighlighter
|
||||||
|
* http://alexgorbatchev.com/
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||||
|
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||||
|
*
|
||||||
|
* @version
|
||||||
|
* 2.0.296 (March 01 2009)
|
||||||
|
*
|
||||||
|
* @copyright
|
||||||
|
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||||
|
*
|
||||||
|
* @license
|
||||||
|
* This file is part of SyntaxHighlighter.
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
SyntaxHighlighter.brushes.Bash = function()
|
||||||
|
{
|
||||||
|
var keywords = 'if fi then elif else for do done until while break continue case function return in eq ne gt lt ge le';
|
||||||
|
var commands = 'alias apropos awk bash bc bg builtin bzip2 cal cat cd cfdisk chgrp chmod chown chroot' +
|
||||||
|
'cksum clear cmp comm command cp cron crontab csplit cut date dc dd ddrescue declare df ' +
|
||||||
|
'diff diff3 dig dir dircolors dirname dirs du echo egrep eject enable env ethtool eval ' +
|
||||||
|
'exec exit expand export expr false fdformat fdisk fg fgrep file find fmt fold format ' +
|
||||||
|
'free fsck ftp gawk getopts grep groups gzip hash head history hostname id ifconfig ' +
|
||||||
|
'import install join kill less let ln local locate logname logout look lpc lpr lprint ' +
|
||||||
|
'lprintd lprintq lprm ls lsof make man mkdir mkfifo mkisofs mknod more mount mtools ' +
|
||||||
|
'mv netstat nice nl nohup nslookup open op passwd paste pathchk ping popd pr printcap ' +
|
||||||
|
'printenv printf ps pushd pwd quota quotacheck quotactl ram rcp read readonly renice ' +
|
||||||
|
'remsync rm rmdir rsync screen scp sdiff sed select seq set sftp shift shopt shutdown ' +
|
||||||
|
'sleep sort source split ssh strace su sudo sum symlink sync tail tar tee test time ' +
|
||||||
|
'times touch top traceroute trap tr true tsort tty type ulimit umask umount unalias ' +
|
||||||
|
'uname unexpand uniq units unset unshar useradd usermod users uuencode uudecode v vdir ' +
|
||||||
|
'vi watch wc whereis which who whoami Wget xargs yes'
|
||||||
|
;
|
||||||
|
|
||||||
|
this.regexList = [
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, // one line comments
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
|
||||||
|
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
|
||||||
|
{ regex: new RegExp(this.getKeywords(commands), 'gm'), css: 'functions' } // commands
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
SyntaxHighlighter.brushes.Bash.prototype = new SyntaxHighlighter.Highlighter();
|
||||||
|
SyntaxHighlighter.brushes.Bash.aliases = ['bash', 'shell'];
|
||||||
|
|
||||||
64
phpmailer/test_script/scripts/shBrushCSharp.js
vendored
Normal file
64
phpmailer/test_script/scripts/shBrushCSharp.js
vendored
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
/**
|
||||||
|
* SyntaxHighlighter
|
||||||
|
* http://alexgorbatchev.com/
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||||
|
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||||
|
*
|
||||||
|
* @version
|
||||||
|
* 2.0.296 (March 01 2009)
|
||||||
|
*
|
||||||
|
* @copyright
|
||||||
|
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||||
|
*
|
||||||
|
* @license
|
||||||
|
* This file is part of SyntaxHighlighter.
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
SyntaxHighlighter.brushes.CSharp = function()
|
||||||
|
{
|
||||||
|
var keywords = 'abstract as base bool break byte case catch char checked class const ' +
|
||||||
|
'continue decimal default delegate do double else enum event explicit ' +
|
||||||
|
'extern false finally fixed float for foreach get goto if implicit in int ' +
|
||||||
|
'interface internal is lock long namespace new null object operator out ' +
|
||||||
|
'override params private protected public readonly ref return sbyte sealed set ' +
|
||||||
|
'short sizeof stackalloc static string struct switch this throw true try ' +
|
||||||
|
'typeof uint ulong unchecked unsafe ushort using virtual void while';
|
||||||
|
|
||||||
|
function fixComments(match, regexInfo)
|
||||||
|
{
|
||||||
|
var css = (match[0].indexOf("///") == 0)
|
||||||
|
? 'color1'
|
||||||
|
: 'comments'
|
||||||
|
;
|
||||||
|
|
||||||
|
return [new SyntaxHighlighter.Match(match[0], match.index, css)];
|
||||||
|
}
|
||||||
|
|
||||||
|
this.regexList = [
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, func : fixComments }, // one line comments
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
|
||||||
|
{ regex: /^\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
|
||||||
|
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // c# keyword
|
||||||
|
];
|
||||||
|
|
||||||
|
this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
|
||||||
|
};
|
||||||
|
|
||||||
|
SyntaxHighlighter.brushes.CSharp.prototype = new SyntaxHighlighter.Highlighter();
|
||||||
|
SyntaxHighlighter.brushes.CSharp.aliases = ['c#', 'c-sharp', 'csharp'];
|
||||||
|
|
||||||
99
phpmailer/test_script/scripts/shBrushCpp.js
vendored
Normal file
99
phpmailer/test_script/scripts/shBrushCpp.js
vendored
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
/**
|
||||||
|
* SyntaxHighlighter
|
||||||
|
* http://alexgorbatchev.com/
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||||
|
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||||
|
*
|
||||||
|
* @version
|
||||||
|
* 2.0.296 (March 01 2009)
|
||||||
|
*
|
||||||
|
* @copyright
|
||||||
|
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||||
|
*
|
||||||
|
* @license
|
||||||
|
* This file is part of SyntaxHighlighter.
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
SyntaxHighlighter.brushes.Cpp = function()
|
||||||
|
{
|
||||||
|
// Copyright 2006 Shin, YoungJin
|
||||||
|
|
||||||
|
var datatypes = 'ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR ' +
|
||||||
|
'DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH ' +
|
||||||
|
'HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP ' +
|
||||||
|
'HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY ' +
|
||||||
|
'HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT ' +
|
||||||
|
'HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE ' +
|
||||||
|
'LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF ' +
|
||||||
|
'LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR ' +
|
||||||
|
'LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR ' +
|
||||||
|
'PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT ' +
|
||||||
|
'PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 ' +
|
||||||
|
'POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR ' +
|
||||||
|
'PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 ' +
|
||||||
|
'PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT ' +
|
||||||
|
'SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG ' +
|
||||||
|
'ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM ' +
|
||||||
|
'char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t ' +
|
||||||
|
'clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS ' +
|
||||||
|
'FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t ' +
|
||||||
|
'__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t ' +
|
||||||
|
'jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler ' +
|
||||||
|
'sig_atomic_t size_t _stat __stat64 _stati64 terminate_function ' +
|
||||||
|
'time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf ' +
|
||||||
|
'va_list wchar_t wctrans_t wctype_t wint_t signed';
|
||||||
|
|
||||||
|
var keywords = 'break case catch class const __finally __exception __try ' +
|
||||||
|
'const_cast continue private public protected __declspec ' +
|
||||||
|
'default delete deprecated dllexport dllimport do dynamic_cast ' +
|
||||||
|
'else enum explicit extern if for friend goto inline ' +
|
||||||
|
'mutable naked namespace new noinline noreturn nothrow ' +
|
||||||
|
'register reinterpret_cast return selectany ' +
|
||||||
|
'sizeof static static_cast struct switch template this ' +
|
||||||
|
'thread throw true false try typedef typeid typename union ' +
|
||||||
|
'using uuid virtual void volatile whcar_t while';
|
||||||
|
|
||||||
|
var functions = 'assert isalnum isalpha iscntrl isdigit isgraph islower isprint' +
|
||||||
|
'ispunct isspace isupper isxdigit tolower toupper errno localeconv ' +
|
||||||
|
'setlocale acos asin atan atan2 ceil cos cosh exp fabs floor fmod ' +
|
||||||
|
'frexp ldexp log log10 modf pow sin sinh sqrt tan tanh jmp_buf ' +
|
||||||
|
'longjmp setjmp raise signal sig_atomic_t va_arg va_end va_start ' +
|
||||||
|
'clearerr fclose feof ferror fflush fgetc fgetpos fgets fopen ' +
|
||||||
|
'fprintf fputc fputs fread freopen fscanf fseek fsetpos ftell ' +
|
||||||
|
'fwrite getc getchar gets perror printf putc putchar puts remove ' +
|
||||||
|
'rename rewind scanf setbuf setvbuf sprintf sscanf tmpfile tmpnam ' +
|
||||||
|
'ungetc vfprintf vprintf vsprintf abort abs atexit atof atoi atol ' +
|
||||||
|
'bsearch calloc div exit free getenv labs ldiv malloc mblen mbstowcs ' +
|
||||||
|
'mbtowc qsort rand realloc srand strtod strtol strtoul system ' +
|
||||||
|
'wcstombs wctomb memchr memcmp memcpy memmove memset strcat strchr ' +
|
||||||
|
'strcmp strcoll strcpy strcspn strerror strlen strncat strncmp ' +
|
||||||
|
'strncpy strpbrk strrchr strspn strstr strtok strxfrm asctime ' +
|
||||||
|
'clock ctime difftime gmtime localtime mktime strftime time';
|
||||||
|
|
||||||
|
this.regexList = [
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
|
||||||
|
{ regex: /^ *#.*/gm, css: 'preprocessor' },
|
||||||
|
{ regex: new RegExp(this.getKeywords(datatypes), 'gm'), css: 'color1 bold' },
|
||||||
|
{ regex: new RegExp(this.getKeywords(functions), 'gm'), css: 'functions bold' },
|
||||||
|
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword bold' }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
SyntaxHighlighter.brushes.Cpp.prototype = new SyntaxHighlighter.Highlighter();
|
||||||
|
SyntaxHighlighter.brushes.Cpp.aliases = ['cpp', 'c'];
|
||||||
93
phpmailer/test_script/scripts/shBrushCss.js
vendored
Normal file
93
phpmailer/test_script/scripts/shBrushCss.js
vendored
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
/**
|
||||||
|
* SyntaxHighlighter
|
||||||
|
* http://alexgorbatchev.com/
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||||
|
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||||
|
*
|
||||||
|
* @version
|
||||||
|
* 2.0.296 (March 01 2009)
|
||||||
|
*
|
||||||
|
* @copyright
|
||||||
|
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||||
|
*
|
||||||
|
* @license
|
||||||
|
* This file is part of SyntaxHighlighter.
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
SyntaxHighlighter.brushes.CSS = function()
|
||||||
|
{
|
||||||
|
function getKeywordsCSS(str)
|
||||||
|
{
|
||||||
|
return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b';
|
||||||
|
};
|
||||||
|
|
||||||
|
function getValuesCSS(str)
|
||||||
|
{
|
||||||
|
return '\\b' + str.replace(/ /g, '(?!-)(?!:)\\b|\\b()') + '\:\\b';
|
||||||
|
};
|
||||||
|
|
||||||
|
var keywords = 'ascent azimuth background-attachment background-color background-image background-position ' +
|
||||||
|
'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top ' +
|
||||||
|
'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color ' +
|
||||||
|
'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width ' +
|
||||||
|
'border-bottom-width border-left-width border-width border bottom cap-height caption-side centerline clear clip color ' +
|
||||||
|
'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display ' +
|
||||||
|
'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font ' +
|
||||||
|
'height left letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top ' +
|
||||||
|
'margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans ' +
|
||||||
|
'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page ' +
|
||||||
|
'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position ' +
|
||||||
|
'quotes right richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress ' +
|
||||||
|
'table-layout text-align top text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em ' +
|
||||||
|
'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index';
|
||||||
|
|
||||||
|
var values = 'above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder '+
|
||||||
|
'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed '+
|
||||||
|
'continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double '+
|
||||||
|
'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia '+
|
||||||
|
'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic '+
|
||||||
|
'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha '+
|
||||||
|
'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower '+
|
||||||
|
'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset '+
|
||||||
|
'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side '+
|
||||||
|
'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow '+
|
||||||
|
'small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize '+
|
||||||
|
'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal '+
|
||||||
|
'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin '+
|
||||||
|
'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow';
|
||||||
|
|
||||||
|
var fonts = '[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif [cC]ourier mono sans serif';
|
||||||
|
|
||||||
|
this.regexList = [
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
|
||||||
|
{ regex: /\#[a-fA-F0-9]{3,6}/g, css: 'value' }, // html colors
|
||||||
|
{ regex: /(-?\d+)(\.\d+)?(px|em|pt|\:|\%|)/g, css: 'value' }, // sizes
|
||||||
|
{ regex: /!important/g, css: 'color3' }, // !important
|
||||||
|
{ regex: new RegExp(getKeywordsCSS(keywords), 'gm'), css: 'keyword' }, // keywords
|
||||||
|
{ regex: new RegExp(getValuesCSS(values), 'g'), css: 'value' }, // values
|
||||||
|
{ regex: new RegExp(this.getKeywords(fonts), 'g'), css: 'color1' } // fonts
|
||||||
|
];
|
||||||
|
|
||||||
|
this.forHtmlScript({
|
||||||
|
left: /(<|<)\s*style.*?(>|>)/gi,
|
||||||
|
right: /(<|<)\/\s*style\s*(>|>)/gi
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
SyntaxHighlighter.brushes.CSS.prototype = new SyntaxHighlighter.Highlighter();
|
||||||
|
SyntaxHighlighter.brushes.CSS.aliases = ['css'];
|
||||||
57
phpmailer/test_script/scripts/shBrushDelphi.js
vendored
Normal file
57
phpmailer/test_script/scripts/shBrushDelphi.js
vendored
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
/**
|
||||||
|
* SyntaxHighlighter
|
||||||
|
* http://alexgorbatchev.com/
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||||
|
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||||
|
*
|
||||||
|
* @version
|
||||||
|
* 2.0.296 (March 01 2009)
|
||||||
|
*
|
||||||
|
* @copyright
|
||||||
|
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||||
|
*
|
||||||
|
* @license
|
||||||
|
* This file is part of SyntaxHighlighter.
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
SyntaxHighlighter.brushes.Delphi = function()
|
||||||
|
{
|
||||||
|
var keywords = 'abs addr and ansichar ansistring array as asm begin boolean byte cardinal ' +
|
||||||
|
'case char class comp const constructor currency destructor div do double ' +
|
||||||
|
'downto else end except exports extended false file finalization finally ' +
|
||||||
|
'for function goto if implementation in inherited int64 initialization ' +
|
||||||
|
'integer interface is label library longint longword mod nil not object ' +
|
||||||
|
'of on or packed pansichar pansistring pchar pcurrency pdatetime pextended ' +
|
||||||
|
'pint64 pointer private procedure program property pshortstring pstring ' +
|
||||||
|
'pvariant pwidechar pwidestring protected public published raise real real48 ' +
|
||||||
|
'record repeat set shl shortint shortstring shr single smallint string then ' +
|
||||||
|
'threadvar to true try type unit until uses val var varirnt while widechar ' +
|
||||||
|
'widestring with word write writeln xor';
|
||||||
|
|
||||||
|
this.regexList = [
|
||||||
|
{ regex: /\(\*[\s\S]*?\*\)/gm, css: 'comments' }, // multiline comments (* *)
|
||||||
|
{ regex: /{(?!\$)[\s\S]*?}/gm, css: 'comments' }, // multiline comments { }
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
|
||||||
|
{ regex: /\{\$[a-zA-Z]+ .+\}/g, css: 'color1' }, // compiler Directives and Region tags
|
||||||
|
{ regex: /\b[\d\.]+\b/g, css: 'value' }, // numbers 12345
|
||||||
|
{ regex: /\$[a-zA-Z0-9]+\b/g, css: 'value' }, // numbers $F5D3
|
||||||
|
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keyword
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
SyntaxHighlighter.brushes.Delphi.prototype = new SyntaxHighlighter.Highlighter();
|
||||||
|
SyntaxHighlighter.brushes.Delphi.aliases = ['delphi', 'pascal'];
|
||||||
43
phpmailer/test_script/scripts/shBrushDiff.js
vendored
Normal file
43
phpmailer/test_script/scripts/shBrushDiff.js
vendored
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
/**
|
||||||
|
* SyntaxHighlighter
|
||||||
|
* http://alexgorbatchev.com/
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||||
|
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||||
|
*
|
||||||
|
* @version
|
||||||
|
* 2.0.296 (March 01 2009)
|
||||||
|
*
|
||||||
|
* @copyright
|
||||||
|
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||||
|
*
|
||||||
|
* @license
|
||||||
|
* This file is part of SyntaxHighlighter.
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
SyntaxHighlighter.brushes.Diff = function()
|
||||||
|
{
|
||||||
|
this.regexList = [
|
||||||
|
{ regex: /^\+\+\+.*$/gm, css: 'color2' },
|
||||||
|
{ regex: /^\-\-\-.*$/gm, css: 'color2' },
|
||||||
|
{ regex: /^\s.*$/gm, css: 'color1' },
|
||||||
|
{ regex: /^@@.*@@$/gm, css: 'variable' },
|
||||||
|
{ regex: /^\+[^\+]{1}.*$/gm, css: 'string' },
|
||||||
|
{ regex: /^\-[^\-]{1}.*$/gm, css: 'comments' }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
SyntaxHighlighter.brushes.Diff.prototype = new SyntaxHighlighter.Highlighter();
|
||||||
|
SyntaxHighlighter.brushes.Diff.aliases = ['diff', 'patch'];
|
||||||
69
phpmailer/test_script/scripts/shBrushGroovy.js
vendored
Normal file
69
phpmailer/test_script/scripts/shBrushGroovy.js
vendored
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
/**
|
||||||
|
* SyntaxHighlighter
|
||||||
|
* http://alexgorbatchev.com/
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||||
|
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||||
|
*
|
||||||
|
* @version
|
||||||
|
* 2.0.296 (March 01 2009)
|
||||||
|
*
|
||||||
|
* @copyright
|
||||||
|
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||||
|
*
|
||||||
|
* @license
|
||||||
|
* This file is part of SyntaxHighlighter.
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
SyntaxHighlighter.brushes.Groovy = function()
|
||||||
|
{
|
||||||
|
// Contributed by Andres Almiray
|
||||||
|
// http://jroller.com/aalmiray/entry/nice_source_code_syntax_highlighter
|
||||||
|
|
||||||
|
var keywords = 'as assert break case catch class continue def default do else extends finally ' +
|
||||||
|
'if in implements import instanceof interface new package property return switch ' +
|
||||||
|
'throw throws try while public protected private static';
|
||||||
|
var types = 'void boolean byte char short int long float double';
|
||||||
|
var constants = 'null';
|
||||||
|
var methods = 'allProperties count get size '+
|
||||||
|
'collect each eachProperty eachPropertyName eachWithIndex find findAll ' +
|
||||||
|
'findIndexOf grep inject max min reverseEach sort ' +
|
||||||
|
'asImmutable asSynchronized flatten intersect join pop reverse subMap toList ' +
|
||||||
|
'padRight padLeft contains eachMatch toCharacter toLong toUrl tokenize ' +
|
||||||
|
'eachFile eachFileRecurse eachB yte eachLine readBytes readLine getText ' +
|
||||||
|
'splitEachLine withReader append encodeBase64 decodeBase64 filterLine ' +
|
||||||
|
'transformChar transformLine withOutputStream withPrintWriter withStream ' +
|
||||||
|
'withStreams withWriter withWriterAppend write writeLine '+
|
||||||
|
'dump inspect invokeMethod print println step times upto use waitForOrKill '+
|
||||||
|
'getText';
|
||||||
|
|
||||||
|
this.regexList = [
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
|
||||||
|
{ regex: /""".*"""/g, css: 'string' }, // GStrings
|
||||||
|
{ regex: new RegExp('\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b', 'gi'), css: 'value' }, // numbers
|
||||||
|
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // goovy keyword
|
||||||
|
{ regex: new RegExp(this.getKeywords(types), 'gm'), css: 'color1' }, // goovy/java type
|
||||||
|
{ regex: new RegExp(this.getKeywords(constants), 'gm'), css: 'constants' }, // constants
|
||||||
|
{ regex: new RegExp(this.getKeywords(methods), 'gm'), css: 'functions' } // methods
|
||||||
|
];
|
||||||
|
|
||||||
|
this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
|
||||||
|
}
|
||||||
|
|
||||||
|
SyntaxHighlighter.brushes.Groovy.prototype = new SyntaxHighlighter.Highlighter();
|
||||||
|
SyntaxHighlighter.brushes.Groovy.aliases = ['groovy'];
|
||||||
51
phpmailer/test_script/scripts/shBrushJScript.js
vendored
Normal file
51
phpmailer/test_script/scripts/shBrushJScript.js
vendored
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
/**
|
||||||
|
* SyntaxHighlighter
|
||||||
|
* http://alexgorbatchev.com/
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||||
|
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||||
|
*
|
||||||
|
* @version
|
||||||
|
* 2.0.296 (March 01 2009)
|
||||||
|
*
|
||||||
|
* @copyright
|
||||||
|
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||||
|
*
|
||||||
|
* @license
|
||||||
|
* This file is part of SyntaxHighlighter.
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
SyntaxHighlighter.brushes.JScript = function()
|
||||||
|
{
|
||||||
|
var keywords = 'abstract boolean break byte case catch char class const continue debugger ' +
|
||||||
|
'default delete do double else enum export extends false final finally float ' +
|
||||||
|
'for function goto if implements import in instanceof int interface long native ' +
|
||||||
|
'new null package private protected public return short static super switch ' +
|
||||||
|
'synchronized this throw throws transient true try typeof var void volatile while with';
|
||||||
|
|
||||||
|
this.regexList = [
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
|
||||||
|
{ regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
|
||||||
|
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords
|
||||||
|
];
|
||||||
|
|
||||||
|
this.forHtmlScript(SyntaxHighlighter.regexLib.scriptScriptTags);
|
||||||
|
};
|
||||||
|
|
||||||
|
SyntaxHighlighter.brushes.JScript.prototype = new SyntaxHighlighter.Highlighter();
|
||||||
|
SyntaxHighlighter.brushes.JScript.aliases = ['js', 'jscript', 'javascript'];
|
||||||
55
phpmailer/test_script/scripts/shBrushJava.js
vendored
Normal file
55
phpmailer/test_script/scripts/shBrushJava.js
vendored
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
/**
|
||||||
|
* SyntaxHighlighter
|
||||||
|
* http://alexgorbatchev.com/
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||||
|
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||||
|
*
|
||||||
|
* @version
|
||||||
|
* 2.0.296 (March 01 2009)
|
||||||
|
*
|
||||||
|
* @copyright
|
||||||
|
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||||
|
*
|
||||||
|
* @license
|
||||||
|
* This file is part of SyntaxHighlighter.
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
SyntaxHighlighter.brushes.Java = function()
|
||||||
|
{
|
||||||
|
var keywords = 'abstract assert boolean break byte case catch char class const ' +
|
||||||
|
'continue default do double else enum extends ' +
|
||||||
|
'false final finally float for goto if implements import ' +
|
||||||
|
'instanceof int interface long native new null ' +
|
||||||
|
'package private protected public return ' +
|
||||||
|
'short static strictfp super switch synchronized this throw throws true ' +
|
||||||
|
'transient try void volatile while';
|
||||||
|
|
||||||
|
this.regexList = [
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
|
||||||
|
{ regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, css: 'value' }, // numbers
|
||||||
|
{ regex: /(?!\@interface\b)\@[\$\w]+\b/g, css: 'color1' }, // annotation @anno
|
||||||
|
{ regex: /\@interface\b/g, css: 'color2' }, // @interface keyword
|
||||||
|
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // java keyword
|
||||||
|
];
|
||||||
|
|
||||||
|
this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
|
||||||
|
};
|
||||||
|
|
||||||
|
SyntaxHighlighter.brushes.Java.prototype = new SyntaxHighlighter.Highlighter();
|
||||||
|
SyntaxHighlighter.brushes.Java.aliases = ['java'];
|
||||||
74
phpmailer/test_script/scripts/shBrushPerl.js
vendored
Normal file
74
phpmailer/test_script/scripts/shBrushPerl.js
vendored
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
/**
|
||||||
|
* SyntaxHighlighter
|
||||||
|
* http://alexgorbatchev.com/
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||||
|
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||||
|
*
|
||||||
|
* @version
|
||||||
|
* 2.0.296 (March 01 2009)
|
||||||
|
*
|
||||||
|
* @copyright
|
||||||
|
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||||
|
*
|
||||||
|
* @license
|
||||||
|
* This file is part of SyntaxHighlighter.
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
SyntaxHighlighter.brushes.Perl = function()
|
||||||
|
{
|
||||||
|
// Contributed by David Simmons-Duffin and Marty Kube
|
||||||
|
|
||||||
|
var funcs =
|
||||||
|
'abs accept alarm atan2 bind binmode chdir chmod chomp chop chown chr ' +
|
||||||
|
'chroot close closedir connect cos crypt defined delete each endgrent ' +
|
||||||
|
'endhostent endnetent endprotoent endpwent endservent eof exec exists ' +
|
||||||
|
'exp fcntl fileno flock fork format formline getc getgrent getgrgid ' +
|
||||||
|
'getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr ' +
|
||||||
|
'getnetbyname getnetent getpeername getpgrp getppid getpriority ' +
|
||||||
|
'getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid ' +
|
||||||
|
'getservbyname getservbyport getservent getsockname getsockopt glob ' +
|
||||||
|
'gmtime grep hex index int ioctl join keys kill lc lcfirst length link ' +
|
||||||
|
'listen localtime lock log lstat map mkdir msgctl msgget msgrcv msgsnd ' +
|
||||||
|
'oct open opendir ord pack pipe pop pos print printf prototype push ' +
|
||||||
|
'quotemeta rand read readdir readline readlink readpipe recv rename ' +
|
||||||
|
'reset reverse rewinddir rindex rmdir scalar seek seekdir select semctl ' +
|
||||||
|
'semget semop send setgrent sethostent setnetent setpgrp setpriority ' +
|
||||||
|
'setprotoent setpwent setservent setsockopt shift shmctl shmget shmread ' +
|
||||||
|
'shmwrite shutdown sin sleep socket socketpair sort splice split sprintf ' +
|
||||||
|
'sqrt srand stat study substr symlink syscall sysopen sysread sysseek ' +
|
||||||
|
'system syswrite tell telldir time times tr truncate uc ucfirst umask ' +
|
||||||
|
'undef unlink unpack unshift utime values vec wait waitpid warn write';
|
||||||
|
|
||||||
|
var keywords =
|
||||||
|
'bless caller continue dbmclose dbmopen die do dump else elsif eval exit ' +
|
||||||
|
'for foreach goto if import last local my next no our package redo ref ' +
|
||||||
|
'require return sub tie tied unless untie until use wantarray while';
|
||||||
|
|
||||||
|
this.regexList = [
|
||||||
|
{ regex: new RegExp('#[^!].*$', 'gm'), css: 'comments' },
|
||||||
|
{ regex: new RegExp('^\\s*#!.*$', 'gm'), css: 'preprocessor' }, // shebang
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' },
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' },
|
||||||
|
{ regex: new RegExp('(\\$|@|%)\\w+', 'g'), css: 'variable' },
|
||||||
|
{ regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' },
|
||||||
|
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }
|
||||||
|
];
|
||||||
|
|
||||||
|
this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);
|
||||||
|
}
|
||||||
|
|
||||||
|
SyntaxHighlighter.brushes.Perl.prototype = new SyntaxHighlighter.Highlighter();
|
||||||
|
SyntaxHighlighter.brushes.Perl.aliases = ['perl', 'Perl', 'pl'];
|
||||||
91
phpmailer/test_script/scripts/shBrushPhp.js
vendored
Normal file
91
phpmailer/test_script/scripts/shBrushPhp.js
vendored
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
/**
|
||||||
|
* SyntaxHighlighter
|
||||||
|
* http://alexgorbatchev.com/
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||||
|
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||||
|
*
|
||||||
|
* @version
|
||||||
|
* 2.0.296 (March 01 2009)
|
||||||
|
*
|
||||||
|
* @copyright
|
||||||
|
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||||
|
*
|
||||||
|
* @license
|
||||||
|
* This file is part of SyntaxHighlighter.
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
SyntaxHighlighter.brushes.Php = function()
|
||||||
|
{
|
||||||
|
var funcs = 'abs acos acosh addcslashes addslashes ' +
|
||||||
|
'array_change_key_case array_chunk array_combine array_count_values array_diff '+
|
||||||
|
'array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill '+
|
||||||
|
'array_filter array_flip array_intersect array_intersect_assoc array_intersect_key '+
|
||||||
|
'array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map '+
|
||||||
|
'array_merge array_merge_recursive array_multisort array_pad array_pop array_product '+
|
||||||
|
'array_push array_rand array_reduce array_reverse array_search array_shift '+
|
||||||
|
'array_slice array_splice array_sum array_udiff array_udiff_assoc '+
|
||||||
|
'array_udiff_uassoc array_uintersect array_uintersect_assoc '+
|
||||||
|
'array_uintersect_uassoc array_unique array_unshift array_values array_walk '+
|
||||||
|
'array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert '+
|
||||||
|
'basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress '+
|
||||||
|
'bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir '+
|
||||||
|
'checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists '+
|
||||||
|
'closedir closelog copy cos cosh count count_chars date decbin dechex decoct '+
|
||||||
|
'deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log '+
|
||||||
|
'error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded '+
|
||||||
|
'feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents '+
|
||||||
|
'fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype '+
|
||||||
|
'floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf '+
|
||||||
|
'fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname '+
|
||||||
|
'gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt '+
|
||||||
|
'getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext '+
|
||||||
|
'gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set '+
|
||||||
|
'interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double '+
|
||||||
|
'is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long '+
|
||||||
|
'is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault '+
|
||||||
|
'is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br '+
|
||||||
|
'parse_ini_file parse_str parse_url passthru pathinfo readlink realpath rewind rewinddir rmdir '+
|
||||||
|
'round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split '+
|
||||||
|
'str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes '+
|
||||||
|
'stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk '+
|
||||||
|
'strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime '+
|
||||||
|
'strtoupper strtr strval substr substr_compare';
|
||||||
|
|
||||||
|
var keywords = 'and or xor array as break case ' +
|
||||||
|
'cfunction class const continue declare default die do else ' +
|
||||||
|
'elseif enddeclare endfor endforeach endif endswitch endwhile ' +
|
||||||
|
'extends for foreach function include include_once global if ' +
|
||||||
|
'new old_function return static switch use require require_once ' +
|
||||||
|
'var while abstract interface public implements extends private protected throw';
|
||||||
|
|
||||||
|
var constants = '__FILE__ __LINE__ __METHOD__ __FUNCTION__ __CLASS__';
|
||||||
|
|
||||||
|
this.regexList = [
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
|
||||||
|
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
|
||||||
|
{ regex: /\$\w+/g, css: 'variable' }, // variables
|
||||||
|
{ regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, // common functions
|
||||||
|
{ regex: new RegExp(this.getKeywords(constants), 'gmi'), css: 'constants' }, // constants
|
||||||
|
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keyword
|
||||||
|
];
|
||||||
|
|
||||||
|
this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);
|
||||||
|
};
|
||||||
|
|
||||||
|
SyntaxHighlighter.brushes.Php.prototype = new SyntaxHighlighter.Highlighter();
|
||||||
|
SyntaxHighlighter.brushes.Php.aliases = ['php'];
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user