Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $correoRemitente = trim("correoEmpresa");
- $contrasena = trim("contraseña");
- $nombre = trim("Logistica ");
- $mail = new PHPMailer();
- $mail->IsSMTP();
- $mail->SMTPAuth = true;
- $mail->SMTPSecure = "tls";
- $mail->Host = "outlook.office365.com";
- $mail->Port = 25;
- $mail->Username = $correoRemitente;
- $mail->Password = $contrasena;
- $mail->From = $correoRemitente;
- $mail->FromName = "Logistica CONICO";
- $mail->Subject = "Encomienda";
- $mail->addAddress("p@gmail.com", $nombreCliente);
- $mail->addAddress($correoVend, "Ventas");
- $mail->addAddress("p@gmail.com", "Confirmación de correo");
- $mail->IsHTML(true);
- $body = '<html>
- <head>
- <meta charset="UTF-8">
- </head>
- <body style="font-family:Tahoma, Geneva, sans-serif">
- <h3>Estimado: '.$nombreCliente.'</h3>
- <p>prueba de software conico </p>
- <br>
- <img height="15%" width="60%" src="../imagenes/FIRMA.png">
- </body>
- </html>';
- $mail->MsgHTML($body);
- if($mail->Send()){
- $msg= "En hora buena el mensaje ha sido enviado con exito a '.$destino.'";
- }
- else{
- $msg = "Lo siento, ha habido un error al enviar el mensaje a $destino";
- }
- } catch (Exception $e){
- echo 'Excepción capturada: ', $e->getMessage(), "n";
- }
Add Comment
Please, Sign In to add comment