|  | @@ -37,7 +37,9 @@ class SeminarSignUpController extends ApiController
 | 
	
		
			
			| 37 | 37 |          if (!is_null($backupEmail)) {
 | 
	
		
			
			| 38 | 38 |          
 | 
	
		
			
			| 39 | 39 |              $backupEmail_orig = $request->input('backupEmail', '');
 | 
	
		
			
			| 40 |  | -            $backupEmail = $this->safeEncrypt($backupEmail, 'arm');
 | 
	
		
			
			|  | 40 | +            $backupEmail = $this->safeEncrypt($backupEmail_orig, 'arm');
 | 
	
		
			
			|  | 41 | +        } else {
 | 
	
		
			
			|  | 42 | +            $backupEmail_orig = '';
 | 
	
		
			
			| 41 | 43 |          }
 | 
	
		
			
			| 42 | 44 |  
 | 
	
		
			
			| 43 | 45 |          $phoneNumber = $this->safeEncrypt($request->input('phoneNumber', ''), 'arm');
 | 
	
	
		
			
			|  | @@ -171,44 +173,72 @@ class SeminarSignUpController extends ApiController
 | 
	
		
			
			| 171 | 173 |      {
 | 
	
		
			
			| 172 | 174 |          $data = array('name'=>$firstName);
 | 
	
		
			
			| 173 | 175 |  
 | 
	
		
			
			| 174 |  | -        \Mail::send(['text'=>'mailTW'], $data, function($message) use ($companyEmail, $firstName, $backupEmail) {
 | 
	
		
			
			| 175 |  | -            $message->to($companyEmail, $firstName)->subject('報名成功');       // Registration is complete
 | 
	
		
			
			| 176 |  | -            $message->cc($backupEmail, $firstName)->subject('報名成功');       // Registration is complete
 | 
	
		
			
			| 177 |  | -            $message->from('no-reply@erapr.com.tw','Arm Tech Symposia 2');
 | 
	
		
			
			| 178 |  | -        });
 | 
	
		
			
			|  | 176 | +        if (!empty($backupEmail)) {
 | 
	
		
			
			|  | 177 | +            \Mail::send(['text'=>'mailTW'], $data, function($message) use ($companyEmail, $firstName, $backupEmail) {
 | 
	
		
			
			|  | 178 | +                $message->to($companyEmail, $firstName)->subject('報名成功');       // Registration is complete
 | 
	
		
			
			|  | 179 | +                $message->cc($backupEmail, $firstName)->subject('報名成功');       // Registration is complete
 | 
	
		
			
			|  | 180 | +                $message->from('no-reply@erapr.com.tw','Arm Tech Symposia 2');
 | 
	
		
			
			|  | 181 | +            });
 | 
	
		
			
			|  | 182 | +        } else {
 | 
	
		
			
			|  | 183 | +            \Mail::send(['text'=>'mailTW'], $data, function($message) use ($companyEmail, $firstName) {
 | 
	
		
			
			|  | 184 | +                $message->to($companyEmail, $firstName)->subject('報名成功');       // Registration is complete
 | 
	
		
			
			|  | 185 | +                $message->from('no-reply@erapr.com.tw','Arm Tech Symposia 2');
 | 
	
		
			
			|  | 186 | +            });
 | 
	
		
			
			|  | 187 | +        }
 | 
	
		
			
			| 179 | 188 |      }
 | 
	
		
			
			| 180 | 189 |  
 | 
	
		
			
			| 181 | 190 |      public function mailToUser_JP(string $firstName='', string $companyEmail='', string $backupEmail='')
 | 
	
		
			
			| 182 | 191 |      {
 | 
	
		
			
			| 183 | 192 |          $data = array('name'=>$firstName);
 | 
	
		
			
			| 184 | 193 |  
 | 
	
		
			
			| 185 |  | -        \Mail::send(['text'=>'mailJP'], $data, function($message) use ($companyEmail, $firstName, $backupEmail) {
 | 
	
		
			
			| 186 |  | -            $message->to($companyEmail, $firstName)->subject('登録完了');
 | 
	
		
			
			| 187 |  | -            $message->cc($backupEmail, $backupEmail)->subject('登録完了');
 | 
	
		
			
			| 188 |  | -            $message->from('no-reply@erapr.com.tw','Arm Tech Symposia 2');
 | 
	
		
			
			| 189 |  | -        });
 | 
	
		
			
			|  | 194 | +        if (!empty($backupEmail)) {
 | 
	
		
			
			|  | 195 | +            \Mail::send(['text'=>'mailJP'], $data, function($message) use ($companyEmail, $firstName, $backupEmail) {
 | 
	
		
			
			|  | 196 | +                $message->to($companyEmail, $firstName)->subject('登録完了');
 | 
	
		
			
			|  | 197 | +                $message->cc($backupEmail, $firstName)->subject('登録完了');
 | 
	
		
			
			|  | 198 | +                $message->from('no-reply@erapr.com.tw','Arm Tech Symposia 2');
 | 
	
		
			
			|  | 199 | +            });
 | 
	
		
			
			|  | 200 | +        } else {
 | 
	
		
			
			|  | 201 | +            \Mail::send(['text'=>'mailJP'], $data, function($message) use ($companyEmail, $firstName) {
 | 
	
		
			
			|  | 202 | +                $message->to($companyEmail, $firstName)->subject('登録完了');
 | 
	
		
			
			|  | 203 | +                $message->from('no-reply@erapr.com.tw','Arm Tech Symposia 2');
 | 
	
		
			
			|  | 204 | +            });
 | 
	
		
			
			|  | 205 | +        }
 | 
	
		
			
			| 190 | 206 |      }
 | 
	
		
			
			| 191 | 207 |  
 | 
	
		
			
			| 192 | 208 |      public function mailToUser_KR(string $firstName='', string $companyEmail='', string $backupEmail='')
 | 
	
		
			
			| 193 | 209 |      {
 | 
	
		
			
			| 194 | 210 |          $data = array('name'=>$firstName);
 | 
	
		
			
			| 195 | 211 |  
 | 
	
		
			
			| 196 |  | -        \Mail::send(['text'=>'mailKR'], $data, function($message) use ($companyEmail, $firstName, $backupEmail) {
 | 
	
		
			
			| 197 |  | -            $message->to($companyEmail, $firstName)->subject('등록이 완료되었습니다');
 | 
	
		
			
			| 198 |  | -            $message->cc($backupEmail, $firstName)->subject('등록이 완료되었습니다');
 | 
	
		
			
			| 199 |  | -            $message->from('no-reply@erapr.com.tw','Arm Tech Symposia 2');
 | 
	
		
			
			| 200 |  | -        });
 | 
	
		
			
			|  | 212 | +        if (!empty($backupEmail)) {
 | 
	
		
			
			|  | 213 | +            \Mail::send(['text'=>'mailKR'], $data, function($message) use ($companyEmail, $firstName, $backupEmail) {
 | 
	
		
			
			|  | 214 | +                $message->to($companyEmail, $firstName)->subject('등록이 완료되었습니다');
 | 
	
		
			
			|  | 215 | +                $message->cc($backupEmail, $firstName)->subject('등록이 완료되었습니다');
 | 
	
		
			
			|  | 216 | +                $message->from('no-reply@erapr.com.tw','Arm Tech Symposia 2');
 | 
	
		
			
			|  | 217 | +            });
 | 
	
		
			
			|  | 218 | +        } else {
 | 
	
		
			
			|  | 219 | +            \Mail::send(['text'=>'mailKR'], $data, function($message) use ($companyEmail, $firstName) {
 | 
	
		
			
			|  | 220 | +                $message->to($companyEmail, $firstName)->subject('등록이 완료되었습니다');
 | 
	
		
			
			|  | 221 | +                $message->from('no-reply@erapr.com.tw','Arm Tech Symposia 2');
 | 
	
		
			
			|  | 222 | +            });
 | 
	
		
			
			|  | 223 | +        }
 | 
	
		
			
			| 201 | 224 |      }
 | 
	
		
			
			| 202 | 225 |      
 | 
	
		
			
			| 203 | 226 |      public function mailToUser_EN(string $firstName='', string $companyEmail='', string $backupEmail='')
 | 
	
		
			
			| 204 | 227 |      {
 | 
	
		
			
			| 205 | 228 |          $data = array('name'=>$firstName);
 | 
	
		
			
			| 206 | 229 |  
 | 
	
		
			
			| 207 |  | -        \Mail::send(['text'=>'mailEN'], $data, function($message) use ($companyEmail, $firstName, $backupEmail) {
 | 
	
		
			
			| 208 |  | -            $message->to($companyEmail, $firstName)->subject('Registration is complete');
 | 
	
		
			
			| 209 |  | -            $message->cc($backupEmail, $firstName)->subject('Registration is complete');
 | 
	
		
			
			| 210 |  | -            $message->from('no-reply@erapr.com.tw','Arm Tech Symposia 2');
 | 
	
		
			
			| 211 |  | -        });
 | 
	
		
			
			|  | 230 | +        if (!empty($backupEmail)) {
 | 
	
		
			
			|  | 231 | +            \Mail::send(['text'=>'mailEN'], $data, function($message) use ($companyEmail, $firstName, $backupEmail) {
 | 
	
		
			
			|  | 232 | +                $message->to($companyEmail, $firstName)->subject('Registration is complete');
 | 
	
		
			
			|  | 233 | +                $message->cc($backupEmail, $firstName)->subject('Registration is complete');
 | 
	
		
			
			|  | 234 | +                $message->from('no-reply@erapr.com.tw','Arm Tech Symposia 2');
 | 
	
		
			
			|  | 235 | +            });
 | 
	
		
			
			|  | 236 | +        } else {
 | 
	
		
			
			|  | 237 | +            \Mail::send(['text'=>'mailEN'], $data, function($message) use ($companyEmail, $firstName) {
 | 
	
		
			
			|  | 238 | +                $message->to($companyEmail, $firstName)->subject('Registration is complete');
 | 
	
		
			
			|  | 239 | +                $message->from('no-reply@erapr.com.tw','Arm Tech Symposia 2');
 | 
	
		
			
			|  | 240 | +            });
 | 
	
		
			
			|  | 241 | +        }
 | 
	
		
			
			| 212 | 242 |      }
 | 
	
		
			
			| 213 | 243 |  
 | 
	
		
			
			| 214 | 244 |  }
 |