Results 1 to 13 of 13

Thread: ASP form - email help

  1. #1
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts

    ASP form - email help

    I'm trying to set up a submit to email form in ASP, however I get the error:

    "The transport failed to connect to the server."

    The outbound server being smtp.dsl.pipex.com. What am I doing wrong?

    It is being tested on IIS localhost, are there any settings I need to alter in the IIS SMTP Vserver?

    If you need to see the code to help just ask

    Cheers
    To err is human. To really foul things up ... you need a computer.

  2. #2
    Pixel Abuser Spunkey's Avatar
    Join Date
    Nov 2003
    Location
    Milton Keynes
    Posts
    1,523
    Thanks
    0
    Thanked
    0 times in 0 posts
    ok, hands up and show the code Mr

    shouldnt be anything you need to change on IIS, but is the IIS server also the Exchange server?

  3. #3
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts
    theSchema="http://schemas.microsoft.com/cdo/configuration/"
    Set cdoConfig=server.CreateObject("CDO.Configuration")
    cdoConfig.Fields.Item(theSchema & "sendusing")=2
    cdoConfig.Fields.Item(theSchema & "smtpserver")="smtp.dsl.pipex.com"
    cdoConfig.Fields.Update
    set cdoMessage=Server.CreateObject("CDO.Message")
    cdoMessage.Configuration=cdoConfig
    cdoMessage.From=Request.Form("email")
    cdoMessage.To="my_email@dsl.pipex.com"
    cdoMessage.Subject=Request.Form("subject")
    cdoMessage.TextBody=Request.Form("body")
    cdoMessage.Send
    Set cdoMessage=Nothing
    Set cdoConfig=Nothing
    To err is human. To really foul things up ... you need a computer.

  4. #4
    Pixel Abuser Spunkey's Avatar
    Join Date
    Nov 2003
    Location
    Milton Keynes
    Posts
    1,523
    Thanks
    0
    Thanked
    0 times in 0 posts
    hmm never used CDO myself, i always go for either CDONTS or CDOSYS. I'm not sure how they pick up where the SMTP server is though (my web server is the exchange server too so its never been a problem). I'll have a dig around and see how it's setup.

    heres some code...
    Code:
      set oMail = server.createobject("CDONTS.NewMail")
      oMail.From = "me@myemail.com"
      oMail.To = "you@youremail.com"
      oMail.Subject = "Word Up Brudda"
      oMail.Body = "Hello my friend..... hello"
      oMail.MailFormat = 0   ' IIRC 0 = HTML, 1 = Text - Text is default if not specified
      oMail.Send
    I'll go have a dig see if i can find out more info on where that drags up its SMTP settings from.
    you should be able to use that off the bat as CDONTS is installed with IIS.

    *editamundo*
    Apparently CDONTS uses the system SMTP service of the IIS Machine, if this is running - job done!
    Its done this way because supposedly having your Web Server connected to an SMTP server is, understandably, and open invitation for any DDoS knobheads to use your server as a launching pad to really screw up your day.

    *even more editage*
    heres a link with more info - about how to include attachments, HTML messages etc

    HTH
    Last edited by Spunkey; 20-12-2004 at 12:01 PM.

  5. #5
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts
    Awesome, ta very much mate
    Last edited by yamangman; 20-12-2004 at 12:26 PM.
    To err is human. To really foul things up ... you need a computer.

  6. #6
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts
    It dosn't appear to like it however, I get:

    ActiveX component can't create object: 'CDONTS.NewMail'
    To err is human. To really foul things up ... you need a computer.

  7. #7
    Pixel Abuser Spunkey's Avatar
    Join Date
    Nov 2003
    Location
    Milton Keynes
    Posts
    1,523
    Thanks
    0
    Thanked
    0 times in 0 posts
    are you using Windows 2003 Server? Apparently its not installed by default for that OS, but CDOSYS is!

    ... and I've just realised thats what you were already using *smacks head repeatedly*
    i hate mondays

    try commenting the CDO Configuration object and anything referring to it as you shouldnt need it. Also the methods of the object are slightly different, heres so more info on what needs changing.

    Hopefully *crosses limbs* that should work

  8. #8
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts
    XP SP2

    More errors, this time:

    'The "SendUsing" configuration value is invalid. '

    Now that really has me stumped. I have the line:

    Set objMail = Server.CreateObject("CDO.Message")

    Why wouldn't it inherit the .Send method?
    Last edited by yamangman; 20-12-2004 at 01:42 PM.
    To err is human. To really foul things up ... you need a computer.

  9. #9
    Pixel Abuser Spunkey's Avatar
    Join Date
    Nov 2003
    Location
    Milton Keynes
    Posts
    1,523
    Thanks
    0
    Thanked
    0 times in 0 posts
    Ahhhhh are you using ASP.net?
    im guessing so as you're talking about inheritance - now it makes sense

    I've hardly used .net at all, i was giving you info about the good old no error trapping ASP.

    Heres the ASP101 guide on how to do it, can't be much more help than that though, sorry matey
    http://www.asp101.com/samples/email_aspx.asp

  10. #10
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts
    No, good ol' VBS . From what I can tell objMail would be a new instance of CDO.Message and therefore inherit it's parent methods and properties.

    You've been a great help so far rubbishrubbishrubbishrubbishrubbishey, have you any other ideas?
    To err is human. To really foul things up ... you need a computer.

  11. #11
    Pixel Abuser Spunkey's Avatar
    Join Date
    Nov 2003
    Location
    Milton Keynes
    Posts
    1,523
    Thanks
    0
    Thanked
    0 times in 0 posts
    sorry i havent replied Yamang!

    I tried looking up the error you're getting and got this page - http://www.systemwebmail.com/faq/4.2.2.aspx - but that, as with all the results i got, is dealing with .Net ??

    I've never really had this much of a problem with the webmail components to really know what to look for though

    All i can suggest is checking in service manager to make sure the SMTP service is started and running as i have a sneaky feeling thats the key.

  12. #12
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts
    That's the first thing I checked, it's all fired up 'n' ready to go. I'm just testing a few things with it, i'll report back later if I havn't fixed it.
    To err is human. To really foul things up ... you need a computer.

  13. #13
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts
    ... suffice to say, it's still not working
    To err is human. To really foul things up ... you need a computer.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 11-06-2004, 07:39 PM
  2. VB form borderstyle problems.
    By Dorza in forum Software
    Replies: 1
    Last Post: 30-04-2004, 09:12 AM
  3. asp? not likely!
    By mr_anderson187 in forum Networking and Broadband
    Replies: 0
    Last Post: 06-02-2004, 09:09 PM
  4. Link submit button to my email???
    By Morphic6 in forum Software
    Replies: 3
    Last Post: 04-11-2003, 04:43 PM
  5. Scam email?
    By SarG in forum General Discussion
    Replies: 9
    Last Post: 26-10-2003, 09:29 AM

Posting Permissions

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