Tema: Aspqmail??
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 14/08/2002, 15:09
Avatar de Gurrutello
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>