Results 1 to 8 of 8

Thread: vbscript email

  1. #1

    Thread Starter
    Fanatic Member joltremari's Avatar
    Join Date
    Sep 2000
    Location
    Mississippi
    Posts
    674

    vbscript email

    I would like to allow a user to fill out their name and email in two text boxes and click SUBMIT and this info be emailed to me. I'm having trouble coding the submit onclick event to do this. I searched the forums and found some stuff similar but not quite what I'm doing.

    Any help is appreciated,

    JO
    "I have not failed. I've just found 10,000 ways that won't work."
    'Thomas Edison'

    "If we knew what it was we were doing it wouldn't be called research, would it?"
    'Albert Einstein'

    VB6

  2. #2
    Frenzied Member andreys's Avatar
    Join Date
    Sep 2002
    Location
    Los Angeles
    Posts
    1,615
    Post what you got so far.
    Visit my PROJECTS @ www.asprojects.com

  3. #3

    Thread Starter
    Fanatic Member joltremari's Avatar
    Join Date
    Sep 2000
    Location
    Mississippi
    Posts
    674
    VB Code:
    1. function submit1_onclick() {
    2. SendMail(text1.value  , "myemailgoeshere", "Reg-vs2", text2.value );
    3. }
    4.  
    5.  
    6. Sub SendMail(FromEmail, ToEmail, ToSubject, ToBody)
    7.     Set myMail = CreateObject("CDONTS.NewMail")
    8.     myMail.From = FromEmail
    9.     myMail.To = ToEmail
    10.     myMail.Subject= ToSubject
    11.     myMail.Body = ToBody
    12. End Sub
    "I have not failed. I've just found 10,000 ways that won't work."
    'Thomas Edison'

    "If we knew what it was we were doing it wouldn't be called research, would it?"
    'Albert Einstein'

    VB6

  4. #4
    Frenzied Member andreys's Avatar
    Join Date
    Sep 2002
    Location
    Los Angeles
    Posts
    1,615
    Is it HTML file on each client machine or it will reside on the web server (Intranet, Internet)?
    Visit my PROJECTS @ www.asprojects.com

  5. #5
    Member
    Join Date
    Nov 2002
    Posts
    59
    you need to use myMail.send in order to actually send the email

  6. #6

    Thread Starter
    Fanatic Member joltremari's Avatar
    Join Date
    Sep 2000
    Location
    Mississippi
    Posts
    674
    HOLY MOLY!!! myMail.Send

    ok, now I feel really stupid - and for good reason!!!
    I can't believe I overlooked that.

    Thanks for that

    JO
    "I have not failed. I've just found 10,000 ways that won't work."
    'Thomas Edison'

    "If we knew what it was we were doing it wouldn't be called research, would it?"
    'Albert Einstein'

    VB6

  7. #7
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Norwich, UK
    Posts
    405
    did you ever get any errors with permissions when testing this. cos i'm trying to do exctly the same, and i get permision denied on the .send line

  8. #8
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861
    See my answer...Here
    Last edited by Memnoch1207; Sep 12th, 2003 at 11:24 AM.
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width