Foros del Web » Programando para Internet » ASP Clásico »

Aspqmail??

Estas en el tema de Aspqmail?? en el foro de ASP Clásico en Foros del Web. Alguien me manda un ejemlo de como se usa un ASP QMAIL? es nuevo para mi :roto:...
  #1 (permalink)  
Antiguo 14/08/2002, 13:09
 
Fecha de Ingreso: marzo-2002
Mensajes: 41
Antigüedad: 23 años, 2 meses
Puntos: 0
Aspqmail??

Alguien me manda un ejemlo de como se usa un ASP QMAIL? es nuevo para mi :roto:
  #2 (permalink)  
Antiguo 14/08/2002, 15:09
Avatar de Gurrutello  
Fecha de Ingreso: enero-2002
Ubicación: Ontario,Toronto [Canada]
Mensajes: 2.017
Antigüedad: 23 años, 3 meses
Puntos: 6
Re: Aspqmail??

hola
esto no es mio lo he encontrado buscando en google
Cita:
<%
'-- get the sender's address, and if empty, put your own
If request("email")="" then
'-- put your email address between the quotes below
SenderEmail = "[email protected]"
Else
SenderEmail= request("email")
End If
If request("name")<>"" then
SenderName = request("name")
Else
'-- this can be customized to anything you want
SenderName = "Put default text here"
End If
'-- Now grab the values from the form and
'-- build the message to be sent.
'-- Note the vbCrLf - it is a carriage return
'-- and line feed, which gives you line breaks
'-- in the email message.
Msg = ""
Msg = Msg & "Name: " & request("name") & vbCrLf
Msg = Msg & "City: " & request("city") & vbCrLf
Msg = Msg & "State: " & request("State") & vbCrLf
Msg = Msg & "Country: " & request("Country") & vbCrLf
Msg = Msg & "URL: " & URL & vbCrLf
Msg = Msg & "Comments:" & vbCrLf
Msg = Msg & request("Comments") & vbCrLf
'-- Now let's instanciate the component
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
'-- the next line enables queue functions and can
'-- be set to false if you don't want to queue
Mailer.QMessage = true
Mailer.FromName = SenderName
Mailer.FromAddress= SenderEmail
'-- The next line should be set for the SMTP server
'-- address of your ISP or webhost
Mailer.RemoteHost = "smtp.host.com"
'-- AddRecipient sets the name of the recipient and
'-- the email address of the recipient - customize!!
Mailer.AddRecipient "Recipient Name", "[email protected]"
Mailer.Subject = "Your subject line here"
Mailer.BodyText = Msg
if Mailer.SendMail then
'-- confirm mail was sent - customize as desired
Response.Write "Mail sent..."
else
'-- return error message - customized as desired
Response.Write "Mail send failure. Error was "
Response.Write Mailer.Response
end if
'-- destroy the mailer object
set Mailer=nothing
%>
saludos

<div align="center"><a href="http://www.publicentral.com" target="_blank"><img src="http://www.publicentral.com/banners/oblig.gif" width="90" height="36" border="0"></a> </div>
  #3 (permalink)  
Antiguo 14/08/2002, 15:34
 
Fecha de Ingreso: marzo-2002
Mensajes: 41
Antigüedad: 23 años, 2 meses
Puntos: 0
Re: Aspqmail??

Ok amiogo ya me funko el test.
pero hay una parte que quisiera reemplazar con los valores de un formulario, me refiero a esta parte

Mailer.BodyText = Msg

me ayudas a averiguarlo. Creo que es pasando variables de una pagina a otra.

Saludos

  #4 (permalink)  
Antiguo 14/08/2002, 15:50
Avatar de Gurrutello  
Fecha de Ingreso: enero-2002
Ubicación: Ontario,Toronto [Canada]
Mensajes: 2.017
Antigüedad: 23 años, 3 meses
Puntos: 6
Re: Aspqmail??

si efectivamente debes recoger las variables del formulario que envias hacia esta pagina

Un poco mas facil seria
Msg = &quot;Nombre:&quot;&amp;request.form(&quot;elnombr e&quot;)&amp;&quot;&lt;br&gt;Email:&quot;&amp;requ est.form(&quot;elemail&quot;)&amp;&quot; etc...&quot;

a ver si te sale
y puedes anular todo esto
Cita:
Msg = Msg &amp; &quot;Name: &quot; &amp; request(&quot;name&quot;) &amp; vbCrLf
Msg = Msg &amp; &quot;City: &quot; &amp; request(&quot;city&quot;) &amp; vbCrLf
Msg = Msg &amp; &quot;State: &quot; &amp; request(&quot;State&quot;) &amp; vbCrLf
Msg = Msg &amp; &quot;Country: &quot; &amp; request(&quot;Country&quot;) &amp; vbCrLf
Msg = Msg &amp; &quot;URL: &quot; &amp; URL &amp; vbCrLf
Msg = Msg &amp; &quot;Comments:&quot; &amp; vbCrLf
Msg = Msg &amp; request(&quot;Comments&quot;) &amp; vbCrLf
prueba a ver
  #5 (permalink)  
Antiguo 14/08/2002, 17:24
 
Fecha de Ingreso: marzo-2002
Mensajes: 41
Antigüedad: 23 años, 2 meses
Puntos: 0
Re: Aspqmail??

Hola brother ya probe la primera forma y la segunda. la segunda no me da error y todo sale ok. pero en la primera que tiene HTML incluido no se puede, en ASPMAIL se podia poner Mailer.IsHTML = True y aceptabas HTML lo he probado en ASPQMAIL y no funka.. debe ser otro parametro, lo seguire buscando... y franco! MIL GRACIAS! por la ayuda
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 11:04.