JaviCss/Blend
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
". "
E-mail: " . $email . "
". "
Telephone contact: " . $phone . "
". "
Mesagge: " . $msj . "
". "
Sent on: " . date('d/m/Y', time()). "
"; //$body = utf8_decode($body); try { //Server settings $mail->SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output $mail->isSMTP(); //Send using SMTP $mail->Host = 'smtp.hostinger.com'; //Set the SMTP server to send through $mail->SMTPAuth = true; //Enable SMTP authentication $mail->Username = 'info@blendaec.com'; //SMTP username $mail->Password = ''; //SMTP password $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; //Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged $mail->Port = 587; //TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above //Recipients $mail->setFrom('info@blendaec.com', 'Mesagge to Blend'); $mail->addAddress('info@blendaec.com'); //Add a recipient //Name is optional // $mail->addBCC('$email'); //$mail->addBCC('bcc@example.com'); //Attachments //$mail->addAttachment('/var/tmp/file.tar.gz'); //Add attachments //$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); //Optional name //Content $mail->isHTML(true); //Set email format to HTML $mail->CharSet = 'UTF-8'; $mail->Subject = 'New message from Blendaec.com'; $mail->Body = $body; $mail->send(); echo 'Message has been sent'; header("Location:index.html"); } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } ?>