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 6 of 6
  1. #1
    Senior Coder BarrMan's Avatar
    Join Date
    Feb 2005
    Location
    Israel.
    Posts
    1,644
    Thanks
    69
    Thanked 83 Times in 82 Posts

    Email is not being sent using CDO.Message

    Hi.
    I'm using my localhost to send an email to myself for testing procedure only.
    I've had trouble configuring the server but finally it worked fine without any errors but the email is still not being sent.

    I've tried the spam box and I've tried other email addresses but still no luck.

    This is my code:
    Code:
    <%@Language="VBScript"%>
    <%Option Explicit%>
    <%Response.Buffer = True%>
    <%
    Dim Email,Configure,sch
    sch = "http://schemas.microsoft.com/cdo/configuration/"
    Set Email = Server.CreateObject("CDO.Message")
    Set Configure = Server.CreateObject("CDO.Configuration")
    With Configure.Fields
    	.Item(sch & "sendusing") = 1
    	.Item(sch & "smtpserver") = "http://127.0.0.1"
    	.Item(sch & "smtpserverpickupdirectory") = "c:\inetpub\mailroot\pickup"
    	.Item(sch & "smtpauthenticate") = 1
    	.Item(sch & "smtpserverport") = 2
    	.Update()
    End With
    
    Set Email.Configuration = Configure
    With Email
    	.Subject = "Hey Imri"
    	.To = "emree3@gmail.com"
    	.From = "http://127.0.0.1"
    	.HTMLBody = "<html><head></head><body><table border=1><tr><td>Hello world</td></tr></table></body></html>"
    	.Send
    End With
    %>
    Any help would be much appreciated.

  • #2
    New Coder
    Join Date
    Aug 2007
    Posts
    57
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Have you read the W3 Schools ASP Tutorial on sending mail?

    ASP Sending e-mail with CDOSYS

    I found it quite useful.

  • #3
    Senior Coder BarrMan's Avatar
    Join Date
    Feb 2005
    Location
    Israel.
    Posts
    1,644
    Thanks
    69
    Thanked 83 Times in 82 Posts
    Quote Originally Posted by Loic View Post
    Have you read the W3 Schools ASP Tutorial on sending mail?

    ASP Sending e-mail with CDOSYS

    I found it quite useful.
    I get no error. It just doesn't send the email.

  • #4
    Regular Coder
    Join Date
    Nov 2007
    Posts
    110
    Thanks
    0
    Thanked 1 Time in 1 Post
    Why dont you try CDONTS mail it sgoog no problem all support is there. Most of the peoples are using it

  • #5
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    Quote Originally Posted by shakir View Post
    Why dont you try CDONTS mail it sgoog no problem all support is there. Most of the peoples are using it
    Apart from the extra functionality offered by CDOSYS, there's also the fact that CDONTS was effectively discontinued in Windows 2000 and is unavailable in Windows Server 2003.

    BarrMan - I've had all sorts of problems getting authenticated messages through with CDOSYS. Have you tried changing the sendusing and authentication methods? That's about all I can suggest... I seem to recall something about needing an IMAP server but I might be way out there

  • #6
    Senior Coder BarrMan's Avatar
    Join Date
    Feb 2005
    Location
    Israel.
    Posts
    1,644
    Thanks
    69
    Thanked 83 Times in 82 Posts
    Hey.
    I don't really think it's a matter of permission because it doesn't display the message but does say it has been sent because I can see the message on IIS mail folder.

    Thanks for the reply though.

    Does anybody else know what the problem might be?

    Thanks again.


  •  

    Posting Permissions

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