Voor de liefhebbers, sinds ik hier enkel frontpage's of niet related door krijg :>
ik heb 't als volgt gedaan in ASP:
PHP-code:
<FORM METHOD=POST ACTION="mailForm.asp">
<INPUT TYPE=HIDDEN NAME="urlSendTo" VALUE="main_missies.htm">
<INPUT TYPE=HIDDEN NAME="urlFromPath" VALUE="kand_meld.asp">
*knip*
<input type="submit" name="Submit" value="Versturen"></td>
</FORM>
En dit is de mailForm.asp waar naar wordt verwezen, hij maak
PHP-code:
<%@ Language=VBScript %>
<% Option Explicit %>
<%
'The header/footer for the email.
Const strHeader = "tekst"
Const strFooter = "tekst"
'Who does this go to? MAKE SURE TO CHANGE THIS TO YOUR EMAIL ADDRESS!
Const strTo = "welk@adresdan.ook"
'This information is optional
Dim strFrom, strSubject, strRedirectURL, strFromPath
strFrom = Request.Form("txtSendToEmailAddress")
if Len(strFrom) = 0 then strFrom = strTo
strSubject = Request.Form("txtEmailSubject")
if Len(strSubject) = 0 then strSubject = "titel"
strRedirectURL = Request.Form("urlSendTo")
if Len(strRedirectURL) = 0 then strRedirectURL = "/"
strFromPath = Request.Form("urlFromPath")
if Len(strFromPath) = 0 then strFromPath = "UNKNOWN"
Dim strBody
strBody = strHeader & ( vbCrLf & vbCrLf )
strBody = strBody & ( "Vanuit formulier: " & strFromPath & vbCrLf ) & _
( "Formulier verzonden op: " & Now() & vbCrLf & vbCrLf )
dim ix, formElementName, formElementValue, prefix, fldName
For ix = 1 to Request.Form.Count
formElementName = Request.Form.Key(ix)
formElementValue = Request.Form.Item(ix)
' what type of field was that on the form?
prefix = Left(formElementName,3)
' and throw away prefix to get actual field name
fldName = Mid(formElementName,4)
' but change periods to spaces for readability
fldName = Replace(fldName, "."," ")
Select Case prefix
' if the prefix indicates this is a form field of interest...
Case "txt","sel","rad","cbo","lst","chk":
' if user didn't answer this question, say so...
if Len(formElementValue) = 0 then formElementValue = "UNANSWERED"
' then tack on the name of the field and the answer
strBody = strBody & (fldName & ": " & formElementValue & vbCrLf)
End Select
Next
strBody = strBody & ( vbCrLf & strFooter )
'Time to send the email
Dim objCDO
Set objCDO = Server.CreateObject("CDONTS.NewMail")
objCDO.To = strTo
objCDO.From = strFrom
objCDO.Subject = strSubject
objCDO.Body = strBody
objCDO.Send
Set objCDO = Nothing
'Send them to the page specified
Response.Redirect strRedirectURL
%>
Met dit scriptje kan je bij het adres welk adres dan ook invullen en je form gegevens zullen daar in de mail-box komen, apart, maar het werkt... let op, er wordt gebruik gemaakt van CDO