Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function actionSendmail() {
- require_once('D:/PHPMailer/class.phpgmailer.php');
- $mail = new PHPGMailer();
- //$result = Company::model()->findBySql('select a.email from user a , recruiter b where a.id=b.user_id and b.company_id=2;
- //');
- //echo"result";
- //Yii::app()->session['company_name'] = $result->company_name;
- //Yii::app()->session['company_id'] = $result->id;
- $mail->SMTPSecure = "tls";
- $mail->SMTPAuth = true;
- $mail->Username = '';
- $mail->Password = '';
- $mail->From = '';
- $mail->FromName = '';
- $mail->Subject = $_REQUEST['subject'];
- $mail->AddAddress($_REQUEST['to']);
- $mail->Body = $_REQUEST['message'];
- $mail->Send();
- }
Add Comment
Please, Sign In to add comment