ok drop liste men hvordan skal det se ud i det her.
<%@ LANGUAGE = VBSCRIPT%> <%
mailto = "xx@xxx.dk" emne = ""
navn = request.form("navn") mailfrom = request.form("email") besked = request.form("besked")
' 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
' Most mailservers require a valid email address ' for the sender msg.From = (mailfrom) msg.FromName = (navn)
' Next we have to add some recipients. ' The addRecipients method can be used multiple times. ' Also note how we skip the name the second time, it ' is as you see optional to provide a name. msg.AddRecipient (mailto)
' The subject of the message msg.Subject = (emne)
' The body property is both read and write. ' If you want to append text to the body you can ' use JMail.Body = JMail.Body & "Hello world! " ' or you can use JMail.AppendText "Hello World! " ' which in many cases is easier to use. ' ' Note the use of vbCrLf to add linebreaks to our email msg.Body = "Navn: " & (navn) & vbCrLf msg.Body = msg.Body & "E-mail: " & (mailfrom) & vbCrLf msg.Body = msg.Body & "Besked: "& vbCrLf & (besked)
' To capture any errors which might occur, we wrap the call in an IF statement if not msg.Send( "" ) then
fra din formularside skal du have en dropliste som fx <select name="modtager" size="1"> <option selected value="web">webmaster</option> <option value="cl">Claes</option> <option value="hll">Helga</option> </select> @mail.dk <br>
og den aflæses så jf din eksempel <%@ LANGUAGE = VBSCRIPT%> <%
mailto = "xx@xxx.dk" emne = ""
navn = request.form("navn") mailfrom = request.form("email") besked = request.form("besked")
' 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
' Most mailservers require a valid email address ' for the sender msg.From = (mailfrom) msg.FromName = (navn)
' Next we have to add some recipients. ' The addRecipients method can be used multiple times. ' Also note how we skip the name the second time, it ' is as you see optional to provide a name. ' denne linje udgår msg.AddRecipient (mailto) ' -------nyt afsnit ------------ modtager=Request.Form("modtager") select case modtager case "cl" modtager = "Claes" msg.AddRecipient "claes@mail.dk", modtager case "hll" modtager = "Helga" msg.AddRecipient "helga@mail.dk", modtager case else modtager = "Webmaster" msg.AddRecipient "webmaster@mail.dk", modtager end select ' -------nyt afsnit slut ------------
' The subject of the message msg.Subject = (emne)
' The body property is both read and write. ' If you want to append text to the body you can ' use JMail.Body = JMail.Body & "Hello world! " ' or you can use JMail.AppendText "Hello World! " ' which in many cases is easier to use. ' ' Note the use of vbCrLf to add linebreaks to our email msg.Body = "Navn: " & (navn) & vbCrLf msg.Body = msg.Body & "E-mail: " & (mailfrom) & vbCrLf msg.Body = msg.Body & "Besked: "& vbCrLf & (besked)
' To capture any errors which might occur, we wrap the call in an IF statement if not msg.Send( "" ) then
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.