ASP - CHEQUEN ESTO POR FAVOR

 
Vista:

CHEQUEN ESTO POR FAVOR

Publicado por RAUL (14 intervenciones) el 19/09/2000 00:00:00
quiero que chequen esto y me digan si funciona, porque yo no lo puedo usar, se necesita el programa que se llama ASPMail y lo pueden encontrar en www.aspemail.com/download.html

<%
´ change to address of your own SMTP server
strHost = "mail.dominio.net"
%>
<html>

<head>
<title>AspEmail: Database.asp</title>
</head>

<body BGCOLOR="#FFFFFF">

<h2>AspEmail: Database.asp</h2>

<h3>Demonstrates sending a message to multiple recipients<br>
whose names and addresses are stored in a database.</h3>
<%
´ connect to the MS Access database in the same directory
strDbPath = Server.MapPath(".") & "\users.mdb"
ConnectStr = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & strDbPath

Set rs = Server.CreateObject("adodb.recordset")
rs.Open "users", ConnectStr, 2, 3

If Request("Send") <> "" Then
´ send email to all users
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = strHost

Mail.From = "[email protected]"
Mail.FromName = "AspEmail Demo"
Mail.Subject = Request("Subject")
Mail.Body = Request("Body")

´ read address from DB and put them in the BCC field
While not rs.EOF
Mail.AddBcc rs("email"), rs("name")
rs.MoveNext
Wend

´ finally: send message
Mail.Send

Response.Write "Success!"
Else
´ simply display the list of users in the datab
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder