Advertisement
Guest User

Untitled

a guest
Dec 7th, 2018
464
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.25 KB | None | 0 0
  1. if ($this->form_validation->run()) {
  2.  
  3.             $message = '<b>Email address : </b>' . $this->input->post('email') . ' <br><br>' .
  4.                     '<b>Message : </b>' . $this->input->post('msg') . ' <br><br>';
  5.  
  6.             //SMTP Settings
  7.             $mail = new PHPMailer();
  8.             $mail->IsSMTP();
  9.             $mail->SMTPAuth = true;
  10.             $mail->SMTPSecure = "tls";
  11.             $mail->Host = "email-smtp.us-east-1.amazonaws.com";
  12.             $mail->Username = "AKIAJ2N2PGI5H67223RA";
  13.             $mail->Password = "ArzBAuBsx3anJgEf73ipOHOzRMac4ODLW3JHV93NJFby";
  14.             $mail->SetFrom('info@conqray.com', 'conqray'); //from (verified email address)
  15.             $mail->Subject = "conqray Contact"; //subject
  16. //message
  17.  
  18.  
  19.             $mail->MsgHTML($message);
  20. //
  21. //recipient
  22.             $mail->AddAddress("info@conqray.com", "");
  23.  
  24. //Success
  25.             if ($mail->Send()) {
  26.                
  27.             }
  28.  
  29.             $in['send'] = 'y';
  30.             $this->session->set_userdata($in);
  31.             redirect();
  32.         } else {
  33.             $data['login'] = 1;
  34.             $data['country'] = $this->max->f($_SERVER["HTTP_CF_CONNECTING_IP"]);
  35.             $this->load->view('header',$data);
  36.             $this->load->view('contact');
  37.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement