Toon posts:

[ASP] Tell a Friend - bericht komt niet aan

Pagina: 1
Acties:
  • 76 views sinds 30-01-2008

Verwijderd

Topicstarter
Ik heb een tell a friend script gevonden. Als ik het script test via hun server, dan werkt het vlekkenloos. Zet ik alles op mijn eigen server dan lijkt alles ook netjes te werken alleen het berichtje komt niet aan. Ik heb een ASP server (we draaien al meerdere ASP scripts op de server.

Na het gebruik van de search krijg ik helaas alleen iets met php. Aangezien ik hierin al helemaal niet thuis ben, wil ik graag verder met dit ASP script.

Hier staat het voorbeeld hoe ik het nu gebruik (en dus zoals het niet werkt). Dit is dus een hyperlink die een popup schermpje aanroept.
code:
1
2
3
4
5
6
7
8
9
10
11
12
<script language="javascript">
function TellFriend(ref)
{ 
var str="toolbar=no,status=no,menubar=no,location=no,scrollbars=yes,resizable=yes,height=320,width=500"
    tellaFriend = window.open(ref,"TellObj",str);
    tellaFriend.opener = top;
} 
 
</script>
</head>
<body>
<a href="javascript:TellFriend('http://www.raven.nl/tellafriend/tell_a_friend_script.asp?page=http%3A%2F%2Fwww%2Eraven%2Enl%2Fcatalogus2005%2Fhtml%2Fcatalogus2005%2Fraven%2Fnederlands%2Fraven%2FItem1920%2Ehtml')"><B>Tip een vriend over dit artikel!</B></a></body>

Het asp script zelf ziet er als volgt uit:
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<HTML>
<HEAD>
<TITLE>codetoad.com: Tell a Friend</TITLE>
 
<BR> 

<% 
 
 

page="" 
qs=Request.ServerVariables("query_string")
if len(qs)>0 then 
    page=right(qs,  len(qs)-5) 
end if

if page=""  then
    page=Request.form("page")
    if page="" then
        Response.Write "Error1"
        Response.End
    end if 
end if 
 
if Request.Form("fromEmail")="" then
     showForm
else
    sendEmail
end if


sub showForm


%>

<HTML>
<HEAD>
<TITLE>Codetoad.com: Tell a Friend</TITLE>




<script language="JavaScript">
<!--
window.focus();
// -->
</script>
</HEAD>
<body bgcolor="#FFFFFF" link="#003399" 
alink="#FF3366" vlink="#003399" text="#000000">

<table border=0 cellpadding=5 cellspacing=5 width=95% >
<tr>
    <td valign="top">
    <table width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="#99ccff">
    <tr>
        <td><font face="verdana, arial" 
        size="2"> <b>Tell a Friend</b></font></td>
    </tr>
    <tr>
        <td>
        <table border=0 cellpadding=5 cellspacing=0 width=100% bgcolor="#ffffff">
        <tr>
            <td valign="top">
                <font face="verdana, arial" size="1">
                Use the form below to send your 
                friend an e-mail telling them about this page 
                (we <b>do not</b> store
                 the email addresses and will <B>never</b> 
                contact you using email addresses entered only in tell-a-friend)
                </font></td>
        </tr>
        <TR>
            <td>
        <table border=0 cellpadding=0 cellspacing=0>
        <TR>
            <td align="left">
            <form action="http://www.raven.nl/tellafriend/tell_a_friend_script.asp" method="POST">
            <font face="verdana, arial" size="2">
            <nobr>Your e-mail: </nobr>
            </font></td>
            <td align="left">
            <input type="Text" name="fromEmail"
             value="" size="32" maxlength="255">
            </TD>
        </tr>
        <TR>
            <td align="left">
            <font face="verdana, arial" size="2">
            <nobr>Your friend's e-mail: </nobr>
            </font></td>
            <td align="left">
            <input type="Text" name="toEmail" 
            value="" size="32" maxlength="255">
            </TD>
            
        </tr>
        <TR>
            <td align="left" valign=top>
            <font face="verdana, arial" size="2">
            <nobr>Additional Message: </nobr>
            </font></td>
            <td align="left">
            <textarea name=message maxlength=500 
            cols=24 rows=5></textarea>
            
            </td>
        </tr>
        <TR><td height="5" colspan="2"></td></tr>
        <TR>
            <td></td>
            <td align="left" valign="top">
            <input type="hidden" name="page" value="<%=page%>">
            
            <input type="Submit"  value="Verzenden"></td></tr>
        </table></td>
        </tr>
        </table>
        </td>
    </tr>
    </table>
    </td>
</tr>
</table>
</form>
<p>

</BODY>
</HTML>
<%


 end sub



sub sendEmail


fromEmail=Request.Form("fromEmail")
toEmail=Request.Form("toEmail")
message=Request.Form("message")
page=Request.Form("page")

Dim objNewMail

Set objNewMail = Server.CreateObject("CDONTS.NewMail")
objNewMail.From = fromEmail
objNewMail.To = toEmail
objNewMail.BCC = "hallo@iemand.nl"

objNewMail.Subject = "Bekijk dit artikel eens"
strBody = "Hallo,"&Vbcrlf&Vbcrlf
strBody=strBody & fromEmail &"  asked us to forward a message to you because " 
strBody=strBody & "they thought you might be interested in the following free "
strBody=strBody & "script tutorial at Codetoad.com: "&vbcrlf&vbcrlf&page&vbcrlf&vbcrlf
strBody=strBody&"__________________________________________"&vbcrlf&Vbcrlf
strBody=strBody& fromEmail & " wrote : " &vbcrlf&Vbcrlf
strBody=strBody&message&vbcrlf&vbcrlf
strBody=strBody&"__________________________________________"&vbcrlf
strBody=strBody&"codetoad.com"&vbcrlf
strBody=strBody&"http://www.codetoad.com"
objNewMail.Body=strBody
objNewMail.Send
Set objNewMail = Nothing



%>

<html>
<body bgcolor="#FFFFFF" link="#003399" 
alink="#FF3366" vlink="#003399" text="#000000">

<table border=0 cellpadding=5 cellspacing=5 width=95% >
<tr>
    <td valign="top">
    <table width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="#99ccff">
    <tr>
        <td><font face="verdana, arial" size="2"> <b>
        Tell a Friend</b></font></td>
    </tr>
    <tr>
        <td>
        <table border=0 cellpadding=5 cellspacing=0 width=100% bgcolor="#ffffff">
        <tr>
            <td align="left" valign=top>
                <font face="verdana, arial, helvetica" SIZE="2">
            Thanks! An e-mail has been sent to <b><%=toEmail%></b>
                telling them about this page. We appreciate 
                you taking the time to help spread the word
                about Codetoad.com.
                <p>
                <b>Note: </b>This message is not a guarantee of delivery.  
                <p>
            &#8226; <a href="javascript:window.close()">Close this window</a>
                </font></td>
        </tr>
        </table>
        </td>
    </tr>
    </table>
    </td>
</tr>
</table>
<p>

</BODY>
</HTML>

<%


end sub%>


De ellende is dat het wel werkt als ik de posturl aanpas naar:
http://www.codetoad.com/asp/tell_a_friend_script.asp maar dan kan ik het script niet aanpassen.

Kan iemand een tipje van sluier geven?

[ Voor 22% gewijzigd door Verwijderd op 02-06-2005 12:16 . Reden: De server is een ASP server ]


  • André
  • Registratie: Maart 2002
  • Laatst online: 06-05 11:13

André

Analytics dude

Dus je hebt een script gevonden en wij mogen het nu werkend maken? Dat is niet de bedoeling, de bedoeling is om zelf eerst uit te zoeken wat er fout gaat zodat je met concrete vragen kunt komen en niet met het hele script. En weet je zeker dat je wel een mailer op de server geinstalleerd hebt?

Deze gaat dicht :)

Ohja: dit soort vragen horen in Programming & Webscripting

[ Voor 7% gewijzigd door André op 02-06-2005 12:24 ]


Dit topic is gesloten.