41 lines
		
	
	
		
			828 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			828 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace App\Jobs;
 | |
| 
 | |
| use App\Http\Controllers\Common\PhpMailController;
 | |
| use Illuminate\Contracts\Queue\ShouldQueue;
 | |
| use Illuminate\Queue\InteractsWithQueue;
 | |
| use Illuminate\Queue\SerializesModels;
 | |
| 
 | |
| class SendEmail extends Job implements ShouldQueue
 | |
| {
 | |
|     use InteractsWithQueue, SerializesModels;
 | |
| 
 | |
| 
 | |
|     protected $from;
 | |
|     protected $to;
 | |
|     protected $message;
 | |
| 
 | |
|     /**
 | |
|      * Create a new job instance.
 | |
|      *
 | |
|      * @return void
 | |
|      */
 | |
|     public function __construct($from, $to, $message)
 | |
|     {
 | |
|         $this->from = $from;
 | |
|         $this->to = $to;
 | |
|         $this->message = $message;
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * Execute the job.
 | |
|      *
 | |
|      * @return void
 | |
|      */
 | |
|     public function handle(PhpMailController $PhpMailController)
 | |
|     {
 | |
|         $PhpMailController->sendEmail($this->from, $this->to, $this->message);
 | |
|     }
 | |
| }
 | 
