Jmail help
Jeg har et email script her:default.asp
<form method="post" action="SendMail.asp">
Complete this form and click the submit-button. We will
answer your msg as soon as possible. <br>
<br>
<table>
<tr>
<td> NickName: </td>
<td>
<input type=text size=25 name="nickname">
</td>
</tr>
<tr>
<td> Email: </td>
<td>
<input type=text size=25 name="email">
</td>
</tr>
<tr>
<td> Icq:</td>
<td>
<input type=text size=25 name="icq">
</td>
</tr>
<tr>
<td> Msn:</td>
<td>
<input type=text size=25 name="msn">
</td>
</tr>
<tr>
<td> Enter your Msg: </td>
<td>
<textarea rows=15 cols=40 name="question"></textarea>
</td>
</tr>
<tr>
<td> </td>
<td>
<input type=submit value="Submit">
</td>
</tr>
</table>
</form>
Sendmail.asp
<%
' Get the form data
senderEmail = "mail@ditdomæne.dk"
subject = "Contact site"
recipient = "andre@privat.tele.dk"
' Create the JMail message Object
set msg = Server.CreateOBject( "JMail.Message" )
' Set logging to true to ease any potential debugging
' And set silent to true as we wish to handle our errors ourself
msg.Logging = true
msg.silent = true
' Enter the sender data
msg.From = senderEmail
msg.FromName = name
' Note that as addRecipient is method and not
' a property, we do not use an equals ( = ) sign
msg.AddRecipient recipient
' The subject of the message
msg.Subject = subject
' And the body
msg.body = "Nickname = " & Request.Form("nickname") & vbcrlf
msg.body = msg.body & "Email = " & Request.Form("email") & vbcrlf
msg.body = msg.body & "Icq = " & Request.Form("icq") & vbcrlf
msg.body = msg.body & "Msn = " & Request.Form("msn") & vbcrlf
msg.body = msg.body & "Icq = " & Request.Form("Icq") & vbcrlf
msg.body = msg.body & "Msg = " & Request.Form("question") & vbcrlf
' Now send the message, using the indicated mailserver
if not msg.Send("pop3.mail.dk" ) then
Response.write "<pre>" & msg.log & "</pre>"
else
Response.write "Message sent succesfully!"
end if
' And we're done! the message has been sent.
%>
Det dur så fint nok, men kan du gøre så man kan vælge den email man vil sende til ligesom her:
http://www.protuna.dk/webz/www.protunahandel.de/email.asp
