Tu Nombre
Tu Email
Nombre de tu amigo
Email de tu amigo
Mensaje
<% if Request.ServerVariables("REQUEST_METHOD") = "POST" then Dim ObjSendMail Set ObjSendMail = CreateObject("CDO.Message") Dim sbody sbody = trim(Request.Form("nombre_o")) & " (" & LCase(trim(Request.Form("email_o"))) & ") te ha enviado este mensaje:" & vbcrlf sbody = sbody & Request.Form("mensaje") & vbcrlf & vbcrlf sbody = sbody & "Visite: http://www.campestrevalledorado.com" 'This section provides the configuration information for the remote SMTP server. ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network). 'ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "c:\inetpub\mailroot\pickup" ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="localhost" ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False) ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 ' If your server requires outgoing authentication uncomment the lines bleow and use a valid email address and password. 'ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication 'ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="somemail@yourserver.com" 'ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="yourpassword" ObjSendMail.Configuration.Fields.Update 'End remote SMTP server configuration section== ObjSendMail.To = LCase(Trim(Request.Form("email_d"))) ObjSendMail.Subject = "De " & Trim(Request.Form("nombre_o")) ObjSendMail.From = LCase(trim(Request.Form("email_o"))) ObjSendMail.BCC = "amigo@campestrevalledorado.com" ' we are sending a text email.. simply switch the comments around to send an html email instead 'ObjSendMail.HTMLBody = "this is the body" ObjSendMail.TextBody = sbody ObjSendMail.Send Set ObjSendMail = Nothing Dim sqlQuery sqlQuery = "INSERT INTO AMIGO (DE, PARA, EMAILDE, EMAILPARA, MENSAJE, FECHA) VALUES " sqlQuery = sqlQuery & "('" & Trim(Request.Form("nombre_o")) & "','" & Trim(Request.Form("nombre_d")) sqlQuery = sqlQuery & "','" & LCase(Trim(Request.Form("email_o"))) & "','" & LCase(Trim(Request.Form("email_d"))) sqlQuery = sqlQuery & "','" & Trim(Request.Form("mensaje")) & "', Date())" Dim conn, strConnection On Error Resume Next Set conn = Server.CreateObject("ADODB.Connection") strConnection = "Provider=MSDASQL;DSN=campestreAccess;" conn.open strConnection conn.execute sqlQuery conn.close Set conn = nothing %> <% end if %>