Avatar billede andersasp Nybegynder
07. maj 2002 - 13:05 Der er 5 kommentarer og
1 løsning

Send mail med ASPmail

Hejsa eksperter!

Hvordan kan det være nedenstående kunden sender den sidste post som er gardiner???

Jeg har desværre ikke flere point til at bruge, men håber der er nogle der kan hjælpe!!  tak
-------------------------------------------------

<%
    Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
   
    firma            = Request.Form ("firma")
    kontaktperson        = Request.Form ("kontaktperson")
    funktion        = Request.Form ("funktion")
    adresse            = Request.Form ("adresse")
    postnr            = Request.Form ("postnr")
    by            = Request.Form ("by")
    land            = Request.Form ("land")
    telefon            = Request.Form ("telefon")
    mobil            = Request.Form ("mobil")
    emaile            = Request.Form ("emaile")
    indretning        = Request.Form ("indretning")
    moebler            = Request.Form ("moebler")
    tilbehoer        = Request.Form ("tilbehoer")
    belysning        = Request.Form ("belysning")
    gulvbelaegning        = Request.Form ("gulvbelaegning")
    gardiner        = Request.Form ("gardiner")
   
    Mailer.CharSet            = 2
    Mailer.FromName            = Request.Form ("kontaktperson")
    Mailer.FromAddress        = Request.Form ("emaile")
    Mailer.RemoteHost        = "mail.democritus.dk"
    Mailer.AddRecipient        "Unizone", "anders@democritus.dk"
    Mailer.Subject            = "Tilbagemelding fra unizone.dk"
   
    strBody = "Firma" & VbCrlf
    strBody = firma & VbCrlf & VbCrlf
   
    strBody = "Kontaktperson" & VbCrlf
    strBody = kontaktperson & VbCrlf & VbCrlf
   
    strBody = "Funktion" & VbCrlf
    strBody = funktion & VbCrlf & VbCrlf
   
    strBody = "Adresse" & VbCrlf
    strBody = adresse & VbCrlf & VbCrlf
   
    strBody = "Postnr" & VbCrlf
    strBody = postnr & VbCrlf & VbCrlf
   
    strBody = "By" & VbCrlf
    strBody = by & VbCrlf & VbCrlf
   
    strBody = "Land" & VbCrlf
    strBody = land & VbCrlf & VbCrlf
   
    strBody = "Telefon" & VbCrlf
    strBody = telefon & VbCrlf & VbCrlf
   
    strBody = "Mobil" & VbCrlf
    strBody = mobil & VbCrlf & VbCrlf
   
    strBody = "Email" & VbCrlf
    strBody = emaile & VbCrlf & VbCrlf & VbCrlf
   
    strBody = "Indretning" & VbCrlf
    strBody = indretning & VbCrlf & VbCrlf
   
    strBody = "Møbler" & VbCrlf
    strBody = moebler & VbCrlf & VbCrlf
   
    strBody = "Tilbehør" & VbCrlf
    strBody = tilbehoer & VbCrlf & VbCrlf
   
    strBody = "Belysning" & VbCrlf
    strBody = belysning & VbCrlf & VbCrlf
   
    strBody = "Gulvbelægning" & VbCrlf
    strBody = gulvbelaegning & VbCrlf & VbCrlf
   
    strBody = "Gardiner" & VbCrlf
    strBody = gardiner & VbCrlf & VbCrlf
       
    Mailer.BodyText            = strBody
   
    if Mailer.SendMail then
      Response.redirect("tak.htm")
    else
      Response.Write "Mail send failure. Error was " & Mailer.Response     
    end if
%>
Avatar billede goose Nybegynder
07. maj 2002 - 13:16 #1
Det er nok fordi du bruger strBody flere gange, prøv med:

strBody = "Firma:" & vbcrlf & firma & vbcrlf &_
"Navn: & vbcrlf & vbcrlf & navn & vbcrlf &_

... og så videre.

/Goose
Avatar billede medions Nybegynder
07. maj 2002 - 13:16 #2
<%
    Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
   
    firma            = Request.Form ("firma")
    kontaktperson        = Request.Form ("kontaktperson")
    funktion        = Request.Form ("funktion")
    adresse            = Request.Form ("adresse")
    postnr            = Request.Form ("postnr")
    by            = Request.Form ("by")
    land            = Request.Form ("land")
    telefon            = Request.Form ("telefon")
    mobil            = Request.Form ("mobil")
    emaile            = Request.Form ("emaile")
    indretning        = Request.Form ("indretning")
    moebler            = Request.Form ("moebler")
    tilbehoer        = Request.Form ("tilbehoer")
    belysning        = Request.Form ("belysning")
    gulvbelaegning        = Request.Form ("gulvbelaegning")
    gardiner        = Request.Form ("gardiner")
   
    Mailer.CharSet            = 2
    Mailer.FromName            = Request.Form ("kontaktperson")
    Mailer.FromAddress        = Request.Form ("emaile")
    Mailer.RemoteHost        = "mail.democritus.dk"
    Mailer.AddRecipient        "Unizone", "anders@democritus.dk"
    Mailer.Subject            = "Tilbagemelding fra unizone.dk"
   
    strBody = "Firma" & VbCrlf
    strBody = strBody & firma & VbCrlf & VbCrlf
   
    strBody = strBody & "Kontaktperson" & VbCrlf
    strBody = strBody & kontaktperson & VbCrlf & VbCrlf
   
    strBody = strBody & "Funktion" & VbCrlf
    strBody = strBody & funktion & VbCrlf & VbCrlf
   
    strBody = strBody & "Adresse" & VbCrlf
    strBody = strBody & adresse & VbCrlf & VbCrlf
   
    strBody = strBody & "Postnr" & VbCrlf
    strBody = strBody & postnr & VbCrlf & VbCrlf
   
    strBody = strBody & "By" & VbCrlf
    strBody = strBody & by & VbCrlf & VbCrlf
   
    strBody = strBody & "Land" & VbCrlf
    strBody = strBody & land & VbCrlf & VbCrlf
   
    strBody = strBody & "Telefon" & VbCrlf
    strBody = strBody & telefon & VbCrlf & VbCrlf
   
    strBody = strBody & "Mobil" & VbCrlf
    strBody = strBody & mobil & VbCrlf & VbCrlf
   
    strBody = strBody & "Email" & VbCrlf
    strBody = strBody & emaile & VbCrlf & VbCrlf & VbCrlf
   
    strBody = strBody & "Indretning" & VbCrlf
    strBody = strBody & indretning & VbCrlf & VbCrlf
   
    strBody = strBody & "Møbler" & VbCrlf
    strBody = strBody & moebler & VbCrlf & VbCrlf
   
    strBody = strBody & "Tilbehør" & VbCrlf
    strBody = strBody & tilbehoer & VbCrlf & VbCrlf
   
    strBody = strBody & "Belysning" & VbCrlf
    strBody = strBody & belysning & VbCrlf & VbCrlf
   
    strBody = strBody & "Gulvbelægning" & VbCrlf
    strBody = strBody & gulvbelaegning & VbCrlf & VbCrlf
   
    strBody = strBody & "Gardiner" & VbCrlf
    strBody = strBody & gardiner & VbCrlf & VbCrlf
       
    Mailer.BodyText            = strBody
   
    if Mailer.SendMail then
      Response.redirect("tak.htm")
    else
      Response.Write "Mail send failure. Error was " & Mailer.Response     
    end if
%>

//>Rune
Avatar billede goose Nybegynder
07. maj 2002 - 13:16 #3
Ups, skulle have været et svar :o)

/Goose
Avatar billede medions Nybegynder
07. maj 2002 - 13:17 #4
Det er fordi du definere strBody med nye data'er hver gang...

Hvis du siger
strBody = strBody & "hej"
bliver hej tilføjet til variablen!
hvis du siger
strBody = "hej"
bliver strBody bare = med hej og intet andent

//>Rune
Avatar billede andersasp Nybegynder
07. maj 2002 - 13:18 #5
I er for seje!! tak skal i have!
Avatar billede medions Nybegynder
07. maj 2002 - 13:21 #6
Anytime ;-)
Thx 4 Poinz

//>Rune
Avatar billede Ny bruger Nybegynder

Din løsning...

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.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester