task manager php
1.0.0
작업 관리자 프로젝트에 오신 것을 환영합니다! 이 애플리케이션을 사용하면 사용자는 자신의 작업을 관리하고 그날 예정된 작업에 대한 이메일 알림을 받을 수 있습니다. PHP, MySQL 및 PHPMailer를 사용하여 구축되었습니다.
저장소를 복제하십시오 .
git clone https://github.com/faezedrx/task-manager-php.git
cd task-manager-php
종속성 설치 :
composer require phpmailer/phpmailer
데이터베이스 구성 :
bamboos1_services_portf.sql
파일을 가져옵니다.config.php
파일을 업데이트합니다.이메일 설정 구성 :
email.php
파일을 SMTP 서버 세부사항으로 업데이트하십시오. 응용프로그램 시작 :
사용자 인증 :
작업 관리 :
이메일 알림은 PHPMailer에 의해 처리됩니다. email.php
의 SMTP 설정이 올바르게 구성되었는지 확인하십시오.
<?php
require ' PHPMailer/src/Exception.php ' ;
require ' PHPMailer/src/PHPMailer.php ' ;
require ' PHPMailer/src/SMTP.php ' ;
use PHPMailer PHPMailer PHPMailer ;
use PHPMailer PHPMailer Exception ;
// require 'vendor/autoload.php';
class Mail {
private static $ instance = null ;
private $ mail ;
private function __construct () {
$ this -> mail = new PHPMailer ( true );
$ this -> configureSMTP ();
}
private function configureSMTP () {
// تنظیمات سرور SMTP
$ this -> mail -> isSMTP ();
$ this -> mail -> Host = ' your-smtp-server ' ;
$ this -> mail -> SMTPAuth = true ;
$ this -> mail -> Username = ' [email protected] ' ;
$ this -> mail -> Password = ' your-email-password ' ;
$ this -> mail -> SMTPSecure = PHPMailer:: ENCRYPTION_STARTTLS ;
$ this -> mail -> Port = 587 ;
}
public static function getInstance () {
if ( self :: $ instance == null ) {
self :: $ instance = new Mail ();
}
return self :: $ instance ;
}
public function getMailer () {
return $ this -> mail ;
}
}
function sendEmail ( $ to , $ subject , $ body ) {
$ mailInstance = Mail:: getInstance ()-> getMailer ();
try {
// تنظیمات گیرنده
$ mailInstance -> setFrom ( ' [email protected] ' , ' Task Management ' );
$ mailInstance -> addAddress ( $ to );
// تنظیمات محتوا
$ mailInstance -> isHTML ( true );
$ mailInstance -> Subject = $ subject ;
$ mailInstance -> Body = $ body ;
// ارسال ایمیل
$ mailInstance -> send ();
return true ;
} catch ( Exception $ e ) {
error_log ( " Email could not be sent. Mailer Error: { $ mailInstance -> ErrorInfo }" );
return false ;
}
}
?>
기여를 환영합니다! 변경 사항에 대해 논의하려면 끌어오기 요청을 생성하거나 이슈를 열어주세요.
질문이 있거나 추가 지원이 필요한 경우 제 이메일([email protected])로 언제든지 문의해 주세요.