galego | castellano

Envío de suxestións

$from, 'To' => $to, 'Subject' => $subject, 'Content-Type' => "text/plain; charset=UTF-8" ); $smtp = Mail::factory('smtp', array ('host' => $host, 'port' => $port, 'auth' => true, 'username' => $username, 'password' => $password)); // var_dump($smtp); error_log('Parámetros email:'.$from.' | '.$to.' | '.$host.' | '.$port.' | '.$username,0); // Recept the form, and make de body of message $body = "Formulario enviado\n\n"; $body .= "Remitente: " . $HTTP_POST_VARS["nome"] . "\n\n"; $body .= "Correo electrónico: " . $HTTP_POST_VARS["email"] . "\n\n"; $body .= "Palabra/Expresión: " . $HTTP_POST_VARS["palabra"] . "\n\n"; $body .= "Categoría gramatical: " . $HTTP_POST_VARS["gramatical"] . "\n\n"; $body .= "Suxestión: " . $HTTP_POST_VARS["suxestion"] . "\n\n"; $body .= "Explo contexto: " . $HTTP_POST_VARS["contexto"] . "\n\n"; $body .= "Comentario: " . $HTTP_POST_VARS["comentario"] . "\n\n"; // Send the mail try { $mail = $smtp->send($to, $headers, $body); } catch (Exception $e) { echo $e-getMessage(); } // Checking send if (PEAR::isError($mail)) { echo("

" . $mail->getMessage() . "

"); } else { echo("

A mensaxe foi enviada!

"); } } ?>