Send to user in database

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lizz

    #1

    Send to user in database

    I have a page which i need sent via email when user hits submit button
    here is an example of the CDo code i'm using which is not working.
    Please help


    <%

    Dim objMessage

    Set objMessage = Server.CreateOb ject("CDO.Messa ge")

    objMessage.Conf iguration.Field s.Item("http://schemas.microso ft.com/cdo/configuration/sendusing")
    = 2 'Send the message using the network (SMTP over the network).

    objMessage.Conf iguration.Field s.Item("http://schemas.microso ft.com/cdo/configuration/smtpserver")
    = "127.0.0.1"

    objMessage.Conf iguration.Field s.Item("http://schemas.microso ft.com/cdo/configuration/smtpserverport" )
    = 25

    objMessage.Conf iguration.Field s.Item("http://schemas.microso ft.com/cdo/configuration/smtpusessl")
    = False 'Use SSL for the connection (True or False)

    objMessage.Conf iguration.Field s.Item("http://schemas.microso ft.com/cdo/configuration/smtpconnectiont imeout")
    = 60

    objMessage.Conf iguration.Field s.Update

    With objMessage
    ..To = "cust_email "
    ..From = "Test <Info@testtest. net>"
    ..Subject = "Thank You"
    ..TextBody = "Name: " & Request("cust_n ame") & vbCRLF & vbCRLF &
    "Email: " & Request("cust_e mail") & vbCRLF & vbCRLF & "Message: " &
    Request("emailt ext")
    ..Send
    End With

    Set objMessage = Nothing

    %>


    The fields in the form are obvious from the text body part of the
    script. Any help apprciated.

    Lizz

  • Trevor Best

    #2
    Re: Send to user in database

    Try http://www.trevor.easynet.co.uk/downloads/SendMail.zip

    (write your own HandleError function or rem those lines out)

    Then try having a problem with ms-access next time, that's what this
    group is for <g>

    Comment

    Working...