Add a script to send a test email
This commit is contained in:
parent
fef95b9ace
commit
88eaf66668
19
scripts/test_email.php
Executable file
19
scripts/test_email.php
Executable file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
// Change to working directory
|
||||
chdir(dirname(__FILE__));
|
||||
|
||||
// Include all settings and classes
|
||||
require_once('shared.inc.php');
|
||||
|
||||
// Send email
|
||||
$aMailData = array(
|
||||
'email' => $setting->getValue('system_error_email'),
|
||||
'subject' => 'Test email from mining pool',
|
||||
'coinname' => $config['gettingstarted']['coinname'],
|
||||
'stratumurl' => $config['gettingstarted']['stratumurl'],
|
||||
'stratumport' => $config['gettingstarted']['stratumport']
|
||||
);
|
||||
|
||||
if (!$mail->sendMail('notifications/test_email', $aMailData))
|
||||
echo "Failed to send test email" . PHP_EOL;
|
||||
6
templates/mail/notifications/test_email.tpl
Normal file
6
templates/mail/notifications/test_email.tpl
Normal file
@ -0,0 +1,6 @@
|
||||
{include file="../global/header.tpl"}
|
||||
<h1>Test email</h1>
|
||||
<p>If you see this email - your email protocol is configured correctly</p>
|
||||
<p>Coin name: {$DATA.coinname}</p>
|
||||
<p>Stratum: {$DATA.stratumurl}:{$DATA.stratumport}</p>
|
||||
{include file="../global/footer.tpl"}
|
||||
Loading…
Reference in New Issue
Block a user