Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

How to format a confirmation e-mail in DWCS3?

New Here ,
Feb 10, 2010 Feb 10, 2010

Copy link to clipboard

Copied

Hello,

I'm building a site in which the user has to enter personal information, upload that information into a MySQL DB, and at the end send a conformation e-mail to the user.

So far things are working properly, but I'm still unable to make the system to send the confirmation e-mail in HTML format. My code is as follows:

<?php

$id = $row_rsMision2010['ID'];

$Nombre = $row_rsMision2010['Nombre'];

$Apellido = $row_rsMision2010['Apellido1'];

$Agencia = $row_rsMision2010['Agencia'];

$Direccion = $row_rsMision2010['Direccion'];

$Colonia = $row_rsMision2010['Colonia'];

$Ciudad = $row_rsMision2010['Ciudad'];

$Estado = $row_rsMision2010['Estado'];

$CP = $row_rsMision2010['CP'];

$Lada = $row_rsMision2010['Lada'];

$Telefono = $row_rsMision2010['Telefono'];

$Puesto = $row_rsMision2010['Puesto'];

$Reserva = $row_rsMision2010['Reserva'];

$to = $row_rsMision2010['Mail'];

$subject = "Codigo de Reservacion Registro La Mision 2010 Las Vegas Evolution";

$headers = "De: Oficina de Turismo de Las Vegas para Mexico y Centroamerica" .

"MIME-Version: 1.0rn" .

"Content-type: text/html; charset=UTF-8";

$body = "<html><body>" .

"<h2>Su registro ha sido exitosamente recibido en nuestro sistema.<h2/>" .

"<p>Sus datos registrados son los siguientes:</p>" .

"<p>Nombre: '$Nombre'</p>" .

"<p>Apellidos: '$Apellido'</p>" .

"<p>Agencia: '$Agencia'</p>" .

"<p>Dirección: '$Dirección'</p>" .

"<p>Colonia: '$Colonia'</p>" .

"<p>Ciudad: '$Ciudad'</p>" .

"<p>Estado: '$Estado'</p>" .

"<p>C.P.: '$CP'</p>" .

"<p>Teléfono: '$Lada' - '$Telefono'</p>" .

"<p>Puesto: '$Puesto'</p>" .

"<p>Su Código único e intransferible de admisión es: '$Reserva'</p>" .

"<p>¡No olvide imprimirlo y mostrarlo junto con su identificación oficial a su llegada al evento!</p>" .

"</body></html>";

mail($to, $subject, $body, $headers);

?>

As far as I understand, I might be mistyping something, or having a syntax error while defining the $body variable.

Could someone help me out and check what am I doing wrong?

Thanks for your support in advance.

TOPICS
Server side applications

Views

442
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 11, 2010 Feb 11, 2010

Copy link to clipboard

Copied

Each header needs to be on a separate line. You have simply concatenated them together as a single string.

$headers = "De: Oficina de Turismo de Las Vegas para Mexico y Centroamerica" .

"MIME-Version: 1.0rn" .

"Content-type: text/html; charset=UTF-8";

This should be:

$headers = "From: Oficina de Turismo de Las Vegas para Mexico y Centroamerica\r\n" .

"MIME-Version: 1.0\r\n" .

"Content-type: text/html; charset=UTF-8";

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 12, 2010 Feb 12, 2010

Copy link to clipboard

Copied

LATEST

Thank you so much!

Sure it worked!

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines