/ Forside / Teknologi / Udvikling / ASP / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
ASP
#NavnPoint
smorch 9259
Harlekin 1866
molokyle 1040
Steffanst.. 758
gandalf 657
smilly 564
gibson 560
cumano 530
MouseKeep.. 480
10  Random 410
Kode som selecter alle mails i en database~
Fra : Frode Nordbo


Dato : 24-09-02 11:54

Hei jeg har laget en liten db,som inneholder en rekke mails.
Jeg trodde jeg kunne bruke denne koden for a skaffe dem:
<%

strSQL = "Select * from Mail"

Set rs = Conn.Execute(strSQL)

Do

Response.Write "<a href=mailto:"&rs("E_mail")&">News</a>"
    rs.MoveNext

   Loop While Not rs.EOF%>
Funker til a hente mailen,problemet ligger i at jeg far listet
opp alle adressene pa skjermen.
Men jeg er kun interresert i a ha en link "NEWS" som sender den
samme mail til alle adressene i db.
Kan noen hjelpe meg??
Takk
Frode




--
Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP ???
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! => http://www.html.dk/tutorials

 
 
Jesper Rasmussen (24-09-2002)
Kommentar
Fra : Jesper Rasmussen


Dato : 24-09-02 21:23

"Frode Nordbo" <frodenordbo@hotmail.com> wrote in message
news:ampg7s$fk8$1@sunsite.dk...

FILE 1

<%
Set rs = Conn.Execute("Select * from Mail")

Do While NOT rs.EOF

email = rs("E_mail")

CALL Function_To_Send_Emails_With (Email, Body)

rs.MoveNext

Loop
%>

FILE 2

<a href="file1.asp">NEWS</a>

Function_To_Send_Emails_With is the function you define that will send
emails.

There are plenty of examples on Google.

You don't have to use a function but it is wise to do so as you get a much
more readable code and you can use it on other pages if you wish.

Regards,
Jesper




Frode Nordbo (25-09-2002)
Kommentar
Fra : Frode Nordbo


Dato : 25-09-02 15:38


There are plenty of examples on Google.

I&#8217;m sorry, but now I have worked all the day with your code, and I
still don&#8217;t manage.
Is it possible that you can give me a more precise code.(There is something
wrong when im making the function ??)
I&#8217;ve been into google to try to find the code example, but I only
found code for sending 1 mail, or
How many you specify.
If you don&#8217;t have time to give me the code, could you please give me
the link in google for the answer?
Regards
Frode
I have a big headache!!



--
Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP ???
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! => http://www.html.dk/tutorials

Jesper Rasmussen (25-09-2002)
Kommentar
Fra : Jesper Rasmussen


Dato : 25-09-02 16:21

"Frode Nordbo" <frodenordbo@hotmail.com> wrote in message
news:amshol$ivl$1@sunsite.dk...
>
> Is it possible that you can give me a more precise code.

Sure.

(There is something
> wrong when im making the function ??)

If you post your code in here everyone will be able to help.
Write in your native language if you prefer.
I write in English as to avoid as many communication problems as possible.

Which mail component are you using?
JMail, CDONTS, ASPMAIL, another?

Regards,
Jesper



Frode Nordbo (26-09-2002)
Kommentar
Fra : Frode Nordbo


Dato : 26-09-02 16:19

Jesper Rasmussen wrote in dk.edb.internet.webdesign.serverside.asp:
> "Frode Nordbo" <frodenordbo@hotmail.com> wrote in message
> news:amshol$ivl$1@sunsite.dk...
Hei Jesper og alle der ute.
Jeg har videre et lille problem angaende attatchFile.
Kode:
<%
    Dim MyBody2
       Dim MyCDONTSMail3
      %>

    <%
       Set MyCDONTSMail3 = CreateObject("CDONTS.NewMail")
      MyCDONTSMail3.From= "gannic@cariboni-italy.it"
    MyCDONTSMail3.To= "frodenordbo@hotmail.com"

       MyCDONTSMail3.Subject="This is a Test"

'Feilen ligger i denne koden? Hva er galt?
MyCDONTSMail3.AttachFile ("C:\Inetpub\wwwroot\mailtest.txt")

    MyBody2 = " " & vbCrLf
   MyBody2 = MyBody2 & " " & vbCrLf
   MyBody2 = MyBody2 & " "
    MyCDONTSMail3.Body= MyBody2
    MyCDONTSMail3.Send
    set MyCDONTSMail3=nothing
   %>
Tar jeg vekk koden .AttachFile fungerer alt som det skal.



--
Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP ???
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! => http://www.html.dk/tutorials

Søg
Reklame
Statistik
Spørgsmål : 177560
Tips : 31968
Nyheder : 719565
Indlæg : 6408952
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste