Buenos días,
He probado el código que me has dicho Adler, pero no me envía el email, o por lo menos no lo recibo, no me da ningún error el código, así que no se que pasa.
He utilizado el código así:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>Título</title>
<link href="../css/estilo.css" rel="stylesheet" type="text/css" media="all" />
</head>
<%
function enviaEmail(para,cc,desde,asunto,mensaje,servidor)
on error resume next
enviaEmail = false
dim objCDO,objCDOConfig,objFields
Set objCDO = CreateObject("CDO.Message")
Set objCDOConfig = CreateObject("CDO.Configuration")
Set objFields = objCDOConfig.Fields
With objFields
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = servidor
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Item("http://schemas.microsoft.com/cdo/configuration/SendUsing") = 2
.Update
End With
With objCDO
.Configuration = objCDOConfig
.To = para
if cc <> false then
.cc = cc
end if
.From = desde
.Subject = asunto
.TextBody = mensaje
.Send
End With
Set objFields = Nothing
Set objCDO = Nothing
Set objCDOConfig = Nothing
if err.number = 0 then
enviaEmail = true
else
enviaEmail = err.description
end if
on error goto 0
end function
nombre="Pepe"
empresa= "dddd"
cargo= "uno"
telefono= "33333333"
email= "
[email protected]"
asunto= "asuntooooooo"
%>
<body onload="enviaEmail(<% response.Write email %>, <% response.Write email %>,
[email protected], <% response.Write asunto %>, <% response.Write asunto %>, www.ddd.es)">
<table><tr><td><% response.Write email %></td></tr></table>
</body>
</html>
Yo creo que lo utilizo bien, pero si no es así me podrías decir como usarlo?
Muchas gracias.
Un saludo