Advertisement
Guest User

Untitled

a guest
May 30th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.77 KB | None | 0 0
  1. $mail = new PHPMailer();
  2.            
  3.             $location = new CompanyLocation($company->mainLocationId);
  4.            
  5.             $mail->isSMTP();
  6.             $mail->Host = 'smtp.byloca.com';
  7.             $mail->SMTPAuth = true;
  8.             $mail->Username = 'noreply@byloca.com';
  9.             $mail->Password  = 'noreply0123';
  10.             $mail->Port = 25;    
  11.            
  12.             $name = $company->firstname . " " .$company->lastname;
  13.            
  14.             $mail->setFrom('noreply@byloca.com', $name);
  15.             $mail->addReplyTo($company->email, $name);
  16.            
  17.             $mail->isHTML(true);
  18.  
  19.             $mail->Subject = $_POST['title'];
  20.  
  21.             $comp = new Company($_POST['comp']);
  22.             $mail->addBCC($comp->email);
  23.  
  24. if(!$mail->send()) {
  25.                     $error = true;
  26.                     $message = 'Mailer Error: ' . $mail->ErrorInfo;
  27.                 } else {
  28.                     $success = true;
  29.                     $message = 'De mail is verzonden';
  30.                 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement