Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $name = $_POST['nome'];
- $zip = $_POST['cep'];
- $adress = $_POST ['endereco'];
- $number = $_POST['numero'];
- $comp = $_POST['complemento'];
- $neigh = $_POST['bairro'];
- $city = $_POST['cidade'];
- $state = $_POST['estado'];
- $iemail = $_POST['email'];
- $phone = $_POST['telefone'];
- $product = $_POST['produto'];
- $model = $_POST['modelo'];
- $brand = $_POST['marca'];
- $report = $_POST['laudo'];
- $date = $_POST['data'];
- require 'phpmailer/PHPMailerAutoload.php';
- $mail = new PHPMailer;
- //$mail->SMTPDebug = 3; // Enable verbose debug output
- $mail->isSMTP(); // Set mailer to use SMTP
- $mail->Host = 'smtp.meudominio.com'; // Specify main and backup SMTP servers
- $mail->SMTPAuth = true; // Enable SMTP authentication
- $mail->Username = 'contato@meudominio.com';// SMTP username
- $mail->Password = 'minhasenha'; // SMTP password
- $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
- $mail->Port = 587; // TCP port to connect to
- $mail->setFrom('contato@meudominio.com', 'Contato');
- $mail->addAddress($iemail); // Add a recipient
- $mail->addReplyTo('contato@meudominio.com', 'Contato');
- $mail->isHTML(true); // Set email format to HTML
- $mail->Subject = 'Sua Ordem de Serviço Grupo SAB';
- $mail->Body = '
- <table id="recibo">
- <h1>Ordem de serviço</h1>
- <p>Cliente:'.$name'</p>
- <p>CEP:'.$zip'</p>
- <p>Endereço:'.$adress'</p>
- <p>Numero:'.$number'</p>
- <p>Complemento:'.$comp'</p>
- <p>Bairro:'.$neigh'</p>
- <p>Cidade:'.$city'</p>
- <p>Estado:'.$state'</p>
- <p>Produto:'.$produtc'</p>
- <p>Modelo:'.$model'</p>
- <p>Marca:'.$brand'</p>
- <p>Laudo:'.$report'</p>
- </table>';
- $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
- if(!$mail->send()) {
- echo 'Message could not be sent.';
- echo 'Mailer Error: ' . $mail->ErrorInfo;
- } else {
- echo 'Message has been sent';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement