css to square image in the center using divs in phpmailer

0

I have the following problem and that is that I am building a body for the emails that I send on my page. I am using css to be able to bring and place the background image in a div that contains the data sent in the form that through phpmailer will be sent by mail to users what I want is to give a transparent effect as a watermark but that does not affect me to the text

$mail = new PHPMailer(); // create a new object
$mail->IsSMTP(); // enable SMTP
$mail->SMTPDebug = 0; // debugging: 1 = errors and messages, 2 = messages only
$mail->SMTPAuth = true; // authentication enabled
$mail->SMTPSecure = 'tls'; // secure transfer enabled REQUIRED for GMail
$mail->Host = "smtp.gmail.com";
$mail->Port = 587;// or 465
$mail->IsHTML(true);
$mail->Username = "[email protected]";
$mail->Password = "micorreojaja";
$mail->SetFrom("[email protected]");
$mail->Subject = "Nuevo rvento creado ";
$mail->Body = "

    <div style=\"width: 800px;height: ".(450+(strlen($_POST['title'])/6))."px;border: 1px solid #ddd;border-radius:6px;\">

  <div style=\"width: 770px;height: 20px;margin-top: 0; margin-bottom: 0; font-size: 20px; color: inherit;color: #333;
  background-color: #f5f5f5;

  border-color: #ddd;padding: 10px 15px;
  border-bottom: 1px solid transparent;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;\">

        <strong>Nuevo Evento</strong>

         <img src=\"http://micorreojaja.com/img/png.png\" style=\"width: 40px;height: 25px;float: right;\">

  </div>

     <div style=\"border-top: 1px solid #ddd; background-image: url(http://micorreojaja.com/img/png.png); background-repeat: no-repeat;  background-position: center; opacity:0.1;\">  

 //aqui la cosa va bien porque me coloca la imagen traslucida pero 
//en esta parte es donde el opacity:1 en el estilo falla.

     <table style=\"border-collapse: collapse;width: 100%;margin-bottom: 20px;  \">

        <tr>
          <th style=\"text-align: left;padding-top:5px;\">Titulo del evento</th>
          <td style=\"text-align: left;padding-top:5px;\">".$title ."</td>
        </tr>


      </table>


        <fieldset>
            <legend><strong>Datos del evento</strong></legend>
            ".$_POST['descripcion']."
        </fieldset>

  </div>

</div>";
$mail->CharSet = 'UTF-8';
$mail->AddAddress("[email protected]");// es la direccion de correo a donde enviamos una copia de lo ocurrido

$mail->Send();







?>
    
asked by Juan Ortiz 30.06.2018 в 22:15
source

1 answer

0

not to break my head with css, choose to edit the image, make it translucent and then upload it without the opacity of the css Thank you, I hope that another serves you.

    
answered by 30.06.2018 в 22:27