Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Nov 2005
    Posts
    750
    Thanks
    138
    Thanked 1 Time in 1 Post

    SMTP authentication - server error

    Hello

    I replaced:

    Code:
    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="relay-hosting.secureserver.net"
    in the original script I had with:

    Code:
    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="relay-hosting.smtp.my_site.com"
    but received the following server error message:

    500 - Internal server error.
    There is a problem with the resource you are looking for, and it cannot be displayed (it gives no further details although I have 'Show friendly HTTP error messages unchecked in my browser).

    So I then tried:

    Code:
    'ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="relay-hosting.smtp.my_site.com"
    
    
    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="smtp.my_site.com"

    Again, I get the '500 - Internal server error'.

    Any advice, please?

  • #2
    Regular Coder
    Join Date
    Nov 2005
    Posts
    750
    Thanks
    138
    Thanked 1 Time in 1 Post
    Hello

    I have since made one/two amendments to the above code which now looks like this:

    Code:
    <% fromname = Request("fromname")
    friendname = Request("friendname")
    friendemail = Request("friendemail")
    msgBody = "Hello" & friendname & vbcrlf &"I have found a quality Web site and thought you may find it useful: http://www.mySite.com"& vbcrlf &vbcrlf & fromname
    
    Set ObjSendMail = CreateObject("CDO.Message")
    
    'This section provides the configuration information for the remote SMTP server. 
    
    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network). 
    
    
    'ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="relay-hosting.smtp.mySite.com" 
    
    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="smtp.mySite.com" 
    
    
    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 
    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False) 
    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 
    
    ' If server requires outgoing authentication uncomment lines below
     
    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication 
    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="info@mySite.com" 
    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="mySite" 
    
    ObjSendMail.Configuration.Fields.Update 
    
    'End remote SMTP server configuration section 
    
    ObjSendMail.To = friendmail
    ObjSendMail.Subject = friendname & ", check this out."
    ObjSendMail.From = fromname & "@mySite.com"
    
    
    ObjSendMail.TextBody= msgBody
    ObjSendMail.Send
    
    
    Set ObjSendMail = Nothing
    Response.Redirect "www.mySite.com"
    %>
    But I now get the following error:

    CDO.Message.1 error '8004020c'

    At least one recipient is required, but none were found.

    /tell_a_friend.asp, line 67

    Line 67 itself states:

    Code:
    <b>ObjSendMail.Send</b>

    What does that mean, please?

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,700
    Thanks
    80
    Thanked 4,658 Times in 4,620 Posts
    Look at your code:
    Code:
    friendemail = Request("friendemail")
    ...
    ObjSendMail.To = friendmail
    enough said?
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • Users who have thanked Old Pedant for this post:

    SteveH (03-18-2012)

  • #4
    Regular Coder
    Join Date
    Nov 2005
    Posts
    750
    Thanks
    138
    Thanked 1 Time in 1 Post
    Thanks for that OP - I just didn't notice it.

    Cheers


  •  

    Posting Permissions

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