JMAIL sortering i send mail
Når jeg sender mail via mail form er indhold i sendt mail ikke sorteret som i formen.eks. står adresse eller lign på form:
aaa
bbb
ccc
men modtages i mail
bbb
ccc
aaa
Er det muligt at ændre dette ?
Min form ser ud som følger:
<table cellspacing="0" cellpadding="0" width="400" border="0">
<tbody>
<tr>
<td><select id="1" name="aaa">
<option value="0" selected="selected">0 </option>
<option value="1">1 </option>
<option value="2">2 </option>
<option value="3">3 </option>
</select></td>
</tr>
<tr>
<td class="style32"><select id="2" name="bbb">
<option value="0" selected="selected">0 </option>
<option value="1">1 </option>
<option value="2">2 </option>
<option value="3">3 </option>
</select></td>
</tr>
<tr>
<td><select id="3" name="ccc">
<option value="0" selected="selected">0 </option>
<option value="1">1 </option>
<option value="2">2 </option>
<option value="3">3 </option>
</select></td>
</tr>
og send mail script som her:
<%
' 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 = false
msg.silent = false
' Most mailservers require a valid email address
' for the sender
msg.From = Request.Form("email")
msg.FromName = Request.Form("name") & " - " & Request.Form("company")
' Note that as addRecipient is method and not
' a property, we do not use an equals ( = ) sign
msg.AddRecipient "yyy@xxx.dk", "Kampagne"
' recipient = "yyy@xxx.dk"
' The subject of the message
msg.Subject = "kampagne"
sMessageText = sMessageText & "*** Brugers ip: " &request.servervariables("remote_addr") & vbcrlf
sMessageText = sMessageText & "*** Afsendt fra: " &request.servervariables("http_referer") & vbcrlf
sMessageText = sMessageText & "*** Brugers browser & OS: " &request.servervariables("http_user_agent") & vbcrlf
'add every form element and its value to the email
FOR EACH el IN Request.Form
msg.appendtext( el & ": " & Request.form(el) & vbcrlf )
NEXT
' Now send the message, using the indicated mailserver
if not msg.Send("zzz:xxx.yyy.dk") then
Response.write "<pre>" & msg.log & "</pre>"
else
Response.redirect "http://asp.xxx.dk/"
end if
' And we're done! the message has been sent.
%>