Mailliste?
Hvorfor sender den her kun mails til afsenderen??og ikke til brugerne i databasen
jeg bruger jmail versionen
<% admincookienickname=Request.Cookies("admin") %>
<center>
<% if admincookienickname =admin then
response.write "<center><BR>"
response.write "You must be logged."
response.write fontstuff
response.write "</center><BR>"
else %>
<% poster=Request.Form("1") %>
<% thesubjectofmessage=Request.Form("2") %>
<% messagetobesent=Request.Form("3") %>
<% send=Request.Form("send") %>
<% response.write fontstuff %>
<center>
<%
thesubjectofmessage = Replace(thesubjectofmessage, "'", "'")
messagetobesent = Replace(messagetobesent, "'", "'")
%>
<% if send = "" then %>
<table>
<form action="mailall.asp" method="post">
<input type =hidden name="send" value="send">
Senders email<BR>
<input type=text name="1" value="<%response.write siteemail %>"><BR>
Subject<BR>
<input type=text name="2" value=""><BR>
Message<BR>
<textarea name="3" rows=5 cols=25></textarea>
<BR><BR>
<input type=submit value="Send Message">
</form>
</table>
<%end if%>
<%
if send = "send" then
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open dnsname
set RS = Conn.Execute("SELECT usersemail FROM usersdetails")
If not RS.eof then
RS.movefirst
Do
stringz= stringz&","&Rs("usersemail")
Rs.movenext
Loop until RS.eof
End if
Conn.Close
Set Conn = Nothing
Dim myString
Dim myArray
Dim I
MyString = stringz
MyArray = split(MyString,",")
For I=0 to Ubound(MyArray)
messagegoingto=MyArray(I)
if cdontsformail ="yes" then
Dim objNewMail7
Set objNewMail7 = Server.CreateObject("CDONTS.NewMail")
objNewMail7.From = poster
objNewMail7.To = messagegoingto
objNewMail7.Subject = thesubjectofmessage
objNewMail7.Body = messagetobesent
objNewMail7.Send
Set objNewMail7 = Nothing
end if
if aspemailformail ="yes" then
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = smtpmailserver
Mail.From = poster
Mail.FromName= poster
Mail.AddAddress poster, "Portal"
Mail.Subject = "thesubjectofmessage"
Mail.Body = messagetobesent
On Error Resume Next
Mail.Send
If Err <> 0 Then
Response.Write "Error encountered: " & Err.Description
End If
end if
if aspmailformail ="yes" then
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = poster
Mailer.FromAddress= poster
Mailer.RemoteHost = smtpmailserver
Mailer.AddRecipient poster, "Portal"
Mailer.Subject = thesubjectofmessage
Mailer.BodyText = messagetobesent
if Mailer.SendMail then
Response.Write " "
else
Response.Write "Mail send failure. Error was " & Mailer.Response
end if
end if
next
end if
end if
response.write "<a href=mailall.asp>Mail Sent</a>"
%>
