Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $mail = new PHPMailer();
- $location = new CompanyLocation($company->mainLocationId);
- $mail->isSMTP();
- $mail->Host = 'smtp.byloca.com';
- $mail->SMTPAuth = true;
- $mail->Username = 'noreply@byloca.com';
- $mail->Password = 'noreply0123';
- $mail->Port = 25;
- $name = $company->firstname . " " .$company->lastname;
- $mail->setFrom('noreply@byloca.com', $name);
- $mail->addReplyTo($company->email, $name);
- $mail->isHTML(true);
- $mail->Subject = $_POST['title'];
- $comp = new Company($_POST['comp']);
- $mail->addBCC($comp->email);
- if(!$mail->send()) {
- $error = true;
- $message = 'Mailer Error: ' . $mail->ErrorInfo;
- } else {
- $success = true;
- $message = 'De mail is verzonden';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement