<?php
if ( ! defined( 'ABSPATH' ) ) exit;
/**
* Class to send an e-mail
*/
if ( !class_exists('cmplz_mailer') ) {
class cmplz_mailer {
public $to;
public $title;
public $headers;
public $message;
public $subject;
public $change_text;
public $sent_to_text;
public $what_now_text;
public $sent_by_text;
public $warning_blocks;
public $error = '';
public $body;
public function __construct() {
$this->sent_by_text = __("This email is part of the Complianz Notification System", "complianz-gdpr");
$this->subject = __("Notification by Complianz", "complianz-gdpr");
$this->title = __("Learn more about our features!", "complianz-gdpr");
$this->sent_to_text = __("This email was sent to", "complianz-gdpr");
$this->what_now_text = __( "What now?", "complianz-gdpr");
$this->change_text = __("I didn't change any settings in the plugin.", "complianz-gdpr");
$domain = '<a href="'.site_url().'">'.site_url().'</a>';
$this->message = sprintf(__("You have enabled a feature on %s. We think it's important to let you know a little bit more about this feature so you can use it without worries.","complianz-gdpr"), $domain);
add_action('wp_mail_failed', array($this, 'log_mailer_errors'), 10, 1);
}
/**
* Send a test email
* @return array
*/
public function send_test_mail(){
if ( !cmplz_user_can_manage() ) {
return ['success' => false, 'message' => 'Not allowed'];
}
$this->to = cmplz_get_option('notifications_email_address' );
if ( !is_email($this->to) ) {
$this->to = get_bloginfo('admin_email');
}
if ( !is_email($this->to) ){
return ['success' => false, 'message' => __('Email address not valid',"complianz-gdpr")];
}
$this->title = __("Complianz - Notification Test", "complianz-gdpr");
$this->message = __("This email is confirmation that any email notices are likely to reach your inbox.", "complianz-gdpr");
$this->warning_blocks = [
[
'title' => __("About notifications","complianz-gdpr"),
'message' => __("Email notifications are only sent for important updates, changes or when certain features are enabled.","complianz-gdpr"),
'url' => 'https://complianz.io/instructions/about-email-notifications/',
]
];
$success = $this->send_mail(true);
if ($success) {
return ['success' => true, 'message' => __('Email sent! Please check your mail', "complianz-gdpr")];
}
if (empty($this->error)) {
$this->error = __('Email could not be sent.', "complianz-gdpr");
} else {
$this->error = __('An error occurred:', "complianz-gdpr").'<br>'.$this->error;
}
return ['success' => false, 'message' => $this->error];
}
public function log_mailer_errors( $wp_error ){
if (is_wp_error($wp_error)) {
$this->error = $wp_error->get_error_message();
}
}
/**
* Send an e-mail with the correct login URL
*
* @param bool $override_rate_limit
*
* @return bool
*/
public function send_mail($override_rate_limit = false) {
if ( empty($this->message) || empty($this->subject) ) {
return false;
}
$this->to = cmplz_get_option('notifications_email_address' );
if ( !is_email($this->to) ) {
$this->to = get_bloginfo('admin_email');
}
$template = file_get_contents(__DIR__.'/templates/email.html');
$block_html = '';
if (is_array($this->warning_blocks) && count($this->warning_blocks)>0) {
$block_template = file_get_contents(__DIR__.'/templates/block.html');
foreach ($this->warning_blocks as $warning_block){
$block_html .= str_replace(
['{title}','{message}','{url}'],
[ sanitize_text_field($warning_block['title']), wp_kses_post($warning_block['message']), esc_url_raw($warning_block['url']) ],
$block_template);
}
}
$body = str_replace(
[
'{title}',
'{message}',
'{warnings}',
'{email-address}',
'{learn-more}',
'{site_url}',
'{change_text}',
'{what_now}',
'{sent_to_text}',
'{sent_by_text}'
],
[
sanitize_text_field( $this->title ),
wp_kses_post( $this->message ),
$block_html,
$this->to,
__( "Learn more", "complianz-gdpr" ),
site_url(),
$this->change_text,
$this->what_now_text,
$this->sent_to_text,
$this->sent_by_text
], $template );
$success = wp_mail( $this->to, sanitize_text_field($this->subject), $body, array('Content-Type: text/html; charset=UTF-8') );
set_transient('cmplz_email_recently_sent', true, 5 * MINUTE_IN_SECONDS );
return $success;
}
/**
* Sends a basic email.
*
* This method checks if the necessary properties (`to`, `message`, and `subject`) are set before sending the email.
* If any of these properties are empty, the method returns false.
* Otherwise, it sends the email using the `wp_mail` function.
*
* @return bool True if the email was sent successfully, false otherwise.
*/
public function send_basic_mail() {//
// check the properties before to send
if ( empty($this->to) || empty($this->message) || empty($this->subject) ) {
return false;
}
return wp_mail( $this->to, sanitize_text_field($this->subject), wp_kses_post($this->body), $this->headers);
}
}
}
“Manus AI”… مساعد رقمي بقدرات متقدمة وحدود تجارية صارمة
كتبت إيريني أنطون
في ظل تصاعد الاهتمام بتطبيقات الذكاء الاصطناعي، برز تطبيق “Manus AI” كمساعد ذكي جديد يعد بتجاوز دور “الدردشة” إلى تنفيذ مهام معقدة، تشمل كتابة المقالات، إنتاج الصوتيات، وتحليل البيانات. إلا أن التجربة في الواقعية مع التطبيق تكشف عن مزيج من الإعجاب والإحباط.
عند تجربة التطبيق لكتابة مقال حول الذكاء الاصطناعي، أظهر “Manus” تجاوبًا دقيقًا ومنظمًا. بدأ بتأكيده على كتابة مقال شامل يغطي الجوانب التاريخية والتقنية والاجتماعية للموضوع، مع وعد بتقديم محتوى غني ومبني على مصادر موثوقة. كما أوضح استعداده لمواصلة العمل ومشاركة التقدم مع المستخدم.
لكن بعد بدء تنفيذ المهمة، توقّف التطبيق في منتصف العملية وطالب بالاشتراك المدفوع لاستكمالها، مما كشف عن سياسة تجارية قائمة على الدفع مقابل الاستمرارية. هذا النموذج قد يمثل عائقًا أمام المستخدمين الذين يتوقعون تجربة مجانية أو مرنة.
في تجربة أخرى، تم اختبار قدرة التطبيق على إنتاج مؤثرات صوتية، حيث طُلب منه إنشاء صوت طائر مع ضوضاء بيئية. وقد نجح في تنفيذ المهمة بدقة، ما يؤكد امتلاكه قدرات إبداعية تتجاوز النصوص الكتابية.
الفرق بين Manus وChatGPT:
يُعد “Manus” بمثابة وكيل ذكاء اصطناعي (AI Agent) يتجاوز الدردشة النصية التقليدية، حيث يمكنه تنفيذ سلسلة من المهام تلقائيًا داخل بيئة عمل افتراضية، مثل التصفح، البرمجة، أو التحكم في أدوات خارجية. بالمقابل، يقدم “ChatGPT” تجربة محادثة متقدمة تقوم على فهم اللغة الطبيعية وتوليد النصوص، مع بعض الإمكانيات التفاعلية، لكنه لا يعمل بشكل مستقل أو تلقائي لتنفيذ مهام متعددة الخطوات إلا إذا تم ربطه بأدوات خارجية (مثل GPTs الخاصة أو الإضافات).
كما أن “ChatGPT” يسمح للمستخدم باستخدام العديد من قدراته مجانًا أو عبر اشتراك شهري ثابت، بينما “Manus” يعمل بنظام نقاط واستهلاك، مما يجعله أكثر تقييدًا من حيث حرية الاستخدام.
يعكس “Manus AI” توجهًا متطورًا في عالم المساعدات الذكية، حيث يجمع بين التفاعل البشري والقدرات التنفيذية المتقدمة. ومع ذلك، فإن نظامه القائم على الاشتراكات ونقاط الاستخدام يضع حدودًا واضحة أمام مجانية الوصول إلى إمكانياته الكاملة. وبينما يُظهر تفوقًا تقنيًا في تنفيذ بعض المهام تلقائيًا، يظل ChatGPT أكثر مرونة وتنوعًا في الاستخدام اليومي، خاصة لمن يبحثون عن مزيج بين القوة وسهولة الوصول.