Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

SMTP Server Form Mail Problem

Options
  • 01-05-2009 3:18pm
    #1
    Registered Users Posts: 242 ✭✭


    Getting an error when i try to submit my contact enquiry form.
    Its to do with the smtp server. My hosting is with Windows Minimus and Blacknight.

    Heres the code.
    <%
    Set myMail=CreateObject("CDO.Message")
    myMail.Subject="Enquiry Form Result"
    myMail.From="my[EMAIL="myform@website.ie"]form@website.ie[/EMAIL]"
    myMail.To="myemail[EMAIL="myemail@website.ie"]@website.ie[/EMAIL]"
    MyMail.TextBody = "These are details from the website contact form" & vbCrLf & Chr(13) & Chr(10)
        MyMail.TextBody = MyMail.TextBody & "Name: " & Request.Form ("name") & vbCrLf
        MyMail.TextBody = MyMail.TextBody & "Email: " & Request.Form ("your_email") & vbCrLf
        MyMail.TextBody = MyMail.TextBody & "Tel No.: " & Request.Form ("tel_no") & vbCrLf 
        MyMail.TextBody = MyMail.TextBody & "Query: " & Request.Form ("query") & vbCrLf & Chr(13) & Chr(10)
    myMail.Configuration.Fields.Item _
     ("[URL]http://schemas.microsoft.com/cdo/configuration/sendusing[/URL]") = 2
    [B]myMail.Configuration.Fields.Item _
     ("[/B][URL="http://schemas.microsoft.com/cdo/configuration/smtpserver"][B]http://schemas.microsoft.com/cdo/configuration/smtpserver[/B][/URL][B]") = _
    "[/B][URL="http://smtp.blacknight.com"][B]http://smtp.blacknight.com[/B][/URL][B]"[/B]
    myMail.Configuration.Fields.Item _
     ("[URL]http://schemas.microsoft.com/cdo/configuration/smtpserverport[/URL]") = 25
    myMail.Configuration.Fields.Update
    
    myMail.Configuration.Fields.Update
    myMail.Send
    set myMail=nothing
    %>
    

    In the bold is where the problem is. I know that blacknight address is wrong. What do i need to put there instead of this to make it work ?
    Thanks


Comments

  • Registered Users Posts: 68,317 ✭✭✭✭seamus


    Take out the http:// from http://smtp.blacknight.com


  • Registered Users Posts: 242 ✭✭SD1990


    thanks seamus for the reply !

    got the proper Server address off blacknight and it works fine now !

    Sorry Mods for posting stupid thread :o


Advertisement