A lume di naso.
Togli il punto prima del WHILE metti il punto e virgola e vai a capo.
Hai un altro errore successivo.
Codice PHP:
$html_body = '
<html>
<head>
<style>
.testo1{text-align:right;color: #CF150E; FONT-FAMILY: Verdana; FONT-SIZE: 15px; TEXT-DECORATION: none; font-weight:bold}
.testo2{text-align:right;color: #000000; FONT-FAMILY: Verdana; FONT-SIZE: 12px; TEXT-DECORATION: none; font-weight:bold}
.testo3{text-align:right;color: #666666; FONT-FAMILY: Verdana; FONT-SIZE: 12px; TEXT-DECORATION: none; font-weight:bold}
a.testo3:link {BACKGROUND: none; COLOR: #666666; FONT-SIZE: 12px; FONT-FAMILY: Verdana, Helvetica; TEXT-DECORATION: none; font-weight:bold}
a.testo3:active {BACKGROUND: none; COLOR: #666666; FONT-SIZE: 12px; FONT-FAMILY: Verdana, Helvetica; TEXT-DECORATION: none; font-weight:bold}
a.testo3:visited {BACKGROUND: none; COLOR: #666666; FONT-SIZE: 12px; FONT-FAMILY: Verdana, Helvetica; TEXT-DECORATION: none; font-weight:bold}
a.testo3:hover {BACKGROUND: none; COLOR: #000000; FONT-SIZE: 12px; FONT-FAMILY: Verdana, Helvetica; TEXT-DECORATION: none; font-weight:bold}
</style>
</head>
<body>
<table width="700" height="10" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="right" background="http://www.adamis.it/images/fondo_email.jpg">
<table width="680" height="600" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="660" height="160"></td>
<td width="20" rowspan="16"></td>
</tr>
<tr>
<td height="50" align="right" class="testo1">
Gentile '.$rowutente["ragione_sociale"].''.$rowutente["nome"].' '.$rowutente["cognome"].'
abbiamo ricevuto correttamente il tuo test.</p>
A seguire le tue risposte:</p></td>
</tr>
<tr>
<td height="5" align="right"></td>
</tr>
';
while ($rowrisposte = mysql_fetch_array($result_risposte)){
$html_body .= $rowrisposte["id_corsi_evento_domande"];
}
Il while (di suo) non restituisce una stringa, quindi non lo puoi concatenare ad una stringa.
Nel ciclo di WHILE devi creare una stringa che concateni alle precedenti (ecco il perché ho messo il nome variabile uguale alla precedente, seguito da PUNTO-UGUALE).
Mi dispiacerebbe se ti licenziassero, quindi una mano te la do' volentieri.... mi viene da dire: se sei pagato per programmare in PHP, almeno le basi dovresti studiarle!
Senza offese, eh: una mia constatazione!