Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.

Cheers,
Kirupa

Results 1 to 4 of 4

Thread: sending email with asp & cdosys

  1. #1
    201
    posts
    Registered User

    sending email with asp & cdosys

    I found this script to send emails from our server, which I later intend to use to send confirmation emails to people who have filled out a form from our site.


    It works fine, if the case is this:

    ObjSendMail.To = "someoesEmail@ourDomain.com"
    ObjSendMail.Subject = "this is the subject"
    ObjSendMail.From = "myEmail@ourDomain.com"


    But won't send like this:

    ObjSendMail.To = "someonesEmail@theirDomain.com"
    ObjSendMail.Subject = "this is the subject"
    ObjSendMail.From = "myEmail@ourDomain.com"


    I'm new to all of this, so if anyone can shine some light to this, would be great.
    Thanks!


    The complete script is below

    Code:
    <%
    Dim ObjSendMail
    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") ="mail.ourdomain.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
         
    
         
    ObjSendMail.Configuration.Fields.Update
         
    
    ObjSendMail.To = "someonesEmail@theirDomain.com"
     ObjSendMail.Subject = "this is the subject"
     ObjSendMail.From = "myEmail@ourDomain.com"
         
    ObjSendMail.HTMLBody = "this is the body"
         
    ObjSendMail.Send
         
    Set ObjSendMail = Nothing 
    
    
    Response.Write "your email has been sent"
    %>
    Last edited by acc; January 19th, 2007 at 12:03 PM. Reason: had the wrong email adddress in place

  2. #2
    201
    posts
    Registered User
    Been looking it up more, and it seems the reason for the problem is that the server cannot relay to an outside domain. Is this something that I can personally change, or have to ask our provider to do?

  3. #3
    Unless you have access to your mail server settings via your server's control panel/admin pages, that's something that your provider must change for you.


    Great, now even Kirupa is { facebooking | twittering }

  4. #4
    201
    posts
    Registered User
    Quote Originally Posted by kirupa View Post
    Unless you have access to your mail server settings via your server's control panel/admin pages, that's something that your provider must change for you.


    Thanks, I will contact them.

Thread Information

Users Browsing this Thread

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

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012