Hoi Tweakers,
Het onderwerp is mischien heel verwarrend,maar het beschrijf de lading wel.
Ik krijg geen foutmeldingen met de volgende code maar hij doet ook niet wat hij moet doen.
De bedoeling is dat er via mijn code een emailbody word gemaakt die een keurige HTML pagina bevat.
De opmaak is volgt:
bla bla bla bla (welkomsttekst )
DATUM || Kopje van de nieuwsbrief als hyperlink|| bookmark om naar het bericht te schieten.
Bericht kopje 1
Bericht kopje 2
Bericht kopje 3
Als ik op de hyperlink druk van het kopje van de nieuwsbrief gaat hij keurig naar de pagina waar het gehele bericht op staat. Als ik op de bookmark klik doet hij echter NIKS.
Als ik met mijn muis erover hang (bookmark )krijg ik een rare code in de statusbar van IE te zien.
( iets van outbind://11-000000 hexadecimalecode )
Wat heb ik verkeerd gedaan? Hieronder de code en vervolgens de HTML string die in de emailbody staat.
Het onderwerp is mischien heel verwarrend,maar het beschrijf de lading wel.
Ik krijg geen foutmeldingen met de volgende code maar hij doet ook niet wat hij moet doen.
De bedoeling is dat er via mijn code een emailbody word gemaakt die een keurige HTML pagina bevat.
De opmaak is volgt:
bla bla bla bla (welkomsttekst )
DATUM || Kopje van de nieuwsbrief als hyperlink|| bookmark om naar het bericht te schieten.
Bericht kopje 1
Bericht kopje 2
Bericht kopje 3
Als ik op de hyperlink druk van het kopje van de nieuwsbrief gaat hij keurig naar de pagina waar het gehele bericht op staat. Als ik op de bookmark klik doet hij echter NIKS.
Als ik met mijn muis erover hang (bookmark )krijg ik een rare code in de statusbar van IE te zien.
( iets van outbind://11-000000 hexadecimalecode )
Wat heb ik verkeerd gedaan? Hieronder de code en vervolgens de HTML string die in de emailbody staat.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
| <!--#include file="common.asp" -->
<!--#include file="functions/functions_send_mail.asp" -->
<!--#include virtual="/adovbs.inc"-->
<!--#include file="sessie.asp" -->
<%
'Set the response buffer to false as we may need to puase while the e-mails are being sent
Response.Buffer = False
'If the session variable is False or does not exsist then redirect the user to the unauthorised user page
If Session("blnIsUserGood") = False or IsNull(Session("blnIsUserGood")) = True then
'Reset Server Variables
Set rsCommon = Nothing
adoCon.Close
Set adoCon = Nothing
'Redirect to unathorised user page
Response.Redirect"unauthorised_user_page.htm"
End If %>
<%
'Open up a connection to our Access Database
'that stores the customer
'information.
Dim sTempquery,var
var="6"
Dim objConn
Set objConn = Server.Createobject ("ADODB.Connection")
objConn.ConnectionString ="DSN=Hupsie"
objConn.Open
'Lees het SQL Commando in
sTempquery = "Select Newsletter_ID,Newsletter_subject,Newsletter_note,Newsletter_date,Newsletter_Cat,Newsletter FROM" & _
" tblMLNewsletter WHERE Newsletter_Cat LIKE '" & var & "%'"
Dim objRS,magic
Dim blnHTMLFormat 'set to true if HTML
Dim strEmailType 'Holds the email type (i.e. HTML/Plain text)
Dim strSubject 'Holds the email subject
Dim strMessage 'Holds the email newsletter
Dim strEmailBody 'Holds the email newsletter
Dim Megaboolean
Dim msg,sch,supermsg,teller
Dim vari
Dim Test
Dim laryCatID 'Array to hold the categories to send mail to
Dim lngLoopCounter 'Holds the loop counter
Dim lngNumberOfMembers 'Holds the number of members email is sent to
Dim strMembersEmail 'Holds the email address
Dim strUserName 'Holds the user name of the member
Dim strMailFormat 'Holds the mail format
Dim lngErrorLoopCounter 'Holds the number of error occured
Dim verrader
'Initiliase variables
lngLoopCounter = 0
lngErrorLoopCounter = 0
supermsg ="<BR>"
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(sch & "sendusing") = 2 ' cdoSendUsingPort
.Item(sch & "smtpserver") = "WASBEER"
.update
End With
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open sTempquery, objConn
'Nu worden de medewerkers afgebeeld'
msg ="<HTML><HEAD><Title></Title></HEAD><body><TABLE BORDER=3><TR><TD><B>Datum van het topic</B></TD><TD><B>onderwerp van het nieuwsbrief topic</B></TD>"
Do While Not ObjRS.EOF
Teller = Teller+1
msg = msg & "<tr valign='top'><td width=100>"
msg = msg & FormatDateTime(objRS.Fields("Newsletter_date"),2)
msg = msg & "</TD><td width=100>"
msg = msg & "<a href=""http://localhost/ProjectXXX/mailing_list/view_newsletter_admin.asp?ID=" & objRS.Fields("Newsletter_ID") & """>"
msg = msg & ObjRS.Fields("Newsletter_Subject")
msg = msg & "</A></td>"
msg = msg & "<TD><a href=""#book" & teller & """>"
msg = msg & "Ga naar de nieuwsberichten"
msg = msg & "</A></td>"
supermsg = supermsg & "<a name=""book" & teller & """>"
supermsg = supermsg & ObjRS.Fields("Newsletter")
supermsg = supermsg & "</a>"
supermsg = supermsg & "<BR><BR>"
Response.Write(Teller)
ObjRS.MoveNext
Loop
'Opschonen van de gebruikte ASP objecten
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
sTempquery=""
msg = msg & "</TABLE>"
supermsg = supermsg & "</BODY></HTML>"
msg =msg & supermsg
Set cdoMessage = CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = "someone@hotmail.com"
.To = "FMeussen@TeStrake.nl"
.Subject = "Sample CDO Message"
.HTMLBody = msg
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
Server.ScriptTimeout = 21600
%> |
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
| <HTML> <HEAD> <Title></Title> </HEAD> <body> <TABLE BORDER=3> <TR><TD> <B>Datum van het topic</B></TD> <TD><B>onderwerp van het nieuwsbrief topic</B></TD> <tr valign='top'><td width=100>2/20/2006</TD> <td width=100><a href="http://localhost/ProjectXXX/mailing_list/view_newsletter_admin.asp?ID=19">Hallo Boppers test</A></td><TD><a href="#book1">Ga naar de nieuwsberichten</A></td> <tr valign='top'><td width=100>2/24/2006</TD> <td width=100><a href="http://localhost/ProjectXXX/mailing_list/view_newsletter_admin.asp?ID=20">Dit is een test run</A></td><TD><a href="#book2">Ga naar de nieuwsberichten</A></td> </TABLE><BR> <a name="book1">[img]"http://localhost/ProjectXXX/mailing_list/images/smiley11.gif"[/img] [img]"http://localhost/ProjectXXX/mailing_list/images/smiley17.gif"[/img]</a>\ <BR><BR> <a name="book2">Hallo, dit is een testrun</a> <BR><BR> </BODY> </HTML> |
[ Voor 17% gewijzigd door Verwijderd op 24-02-2006 13:19 ]