sendMail
This commit is contained in:
		
							parent
							
								
									64fc5fbacc
								
							
						
					
					
						commit
						4e9eda3b5b
					
				| @ -23,18 +23,18 @@ class SendMail extends Request { | |||||||
|       return false; |       return false; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     $mailData = getMailData(); |     $mailConfig = $this->user->getConfiguration()->getMail(); | ||||||
|     $mail = new \External\PHPMailer\PHPMailer; |     $mail = new \External\PHPMailer\PHPMailer; | ||||||
|     $mail->IsSMTP(); |     $mail->IsSMTP(); | ||||||
|     $mail->setFrom($this->getParam('from'), $this->getParam('fromName')); |     $mail->setFrom($this->getParam('from'), $this->getParam('fromName')); | ||||||
|     $mail->addAddress($this->getParam('to')); |     $mail->addAddress($this->getParam('to')); | ||||||
|     $mail->Subject = $this->getParam('subject'); |     $mail->Subject = $this->getParam('subject'); | ||||||
|     $mail->SMTPDebug = 0; |     $mail->SMTPDebug = 0; | ||||||
|     $mail->Host = $mailData->getHost(); |     $mail->Host = $mailConfig->getHost(); | ||||||
|     $mail->Port = $mailData->getPort(); |     $mail->Port = $mailConfig->getPort(); | ||||||
|     $mail->SMTPAuth = true; |     $mail->SMTPAuth = true; | ||||||
|     $mail->Username = $mailData->getLogin(); |     $mail->Username = $mailConfig->getLogin(); | ||||||
|     $mail->Password = $mailData->getPassword(); |     $mail->Password = $mailConfig->getPassword(); | ||||||
|     $mail->SMTPSecure = 'tls'; |     $mail->SMTPSecure = 'tls'; | ||||||
|     $mail->IsHTML(true); |     $mail->IsHTML(true); | ||||||
|     $mail->CharSet = 'UTF-8'; |     $mail->CharSet = 'UTF-8'; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user