send mail from ASP-any ideas??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • r_o
    New Member
    • Jul 2006
    • 35

    send mail from ASP-any ideas??

    hi all,
    im trying to send an email from my asp code,
    im using the CDO object as follows

    Set objMessage = CreateObject("C DO.Message")
    objMessage.Subj ect = "CDO Message"
    objMessage.From = "an email address"
    objMessage.To = "another email address"
    objMessage.Text Body = "message body"
    objMessage.Send

    but my code wouldn't work
    do i need to configure an SMTP server for this to work, change some firewall settings, use some more code ??!!!!!!!!

    Please help me out im new to this :D
  • ilaiyaraja
    New Member
    • Jul 2006
    • 6

    #2
    Hi if ur server have CDONTS object then u can use this code for mail
    set myMail=Server.C reateObject("CD ONTS.NewMail")

    myMail.To = "xxx@xx.com";"x xx@xx.com"
    myMail.from = "xxx@xx.com"(Th is field Mandatory)
    myMail.cc="xxx@ xx.com"
    myMail.Subject = "xxxxxxxxxxxxxx xxxxxxxx"
    myMail.Body="xx xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx "
    myMail.BodyForm at=0
    myMail.MailForm at=0
    myMail.send

    Comment

    • wsrinivas
      New Member
      • Jul 2006
      • 10

      #3
      Hope

      W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.


      This will help you

      Comment

      • tejaswini
        New Member
        • Jul 2006
        • 7

        #4
        Set objCDOSYSCon = Server.CreateOb ject ("CDO.Configura tion")
        objCDOSYSCon.Fi elds ("http://schemas.microso ft.com/cdo/configuration/smtpserver") = "127.0.0.1"
        objCDOSYSCon.Fi elds("http://schemas.microso ft.com/cdo/configuration/smtpserverport" ) = 25
        objCDOSYSCon.Fi elds("http://schemas.microso ft.com/cdo/configuration/sendusing") = 2
        objCDOSYSCon.Fi elds.Update

        try using the configuartion object works fine after you created the object
        Set objCDOSYSMail = Server.CreateOb ject("CDO.Messa ge")

        Comment

        • r_o
          New Member
          • Jul 2006
          • 35

          #5
          Originally posted by tejaswini
          Set objCDOSYSCon = Server.CreateOb ject ("CDO.Configura tion")
          objCDOSYSCon.Fi elds ("http://schemas.microso ft.com/cdo/configuration/smtpserver") = "127.0.0.1"
          objCDOSYSCon.Fi elds("http://schemas.microso ft.com/cdo/configuration/smtpserverport" ) = 25
          objCDOSYSCon.Fi elds("http://schemas.microso ft.com/cdo/configuration/sendusing") = 2
          objCDOSYSCon.Fi elds.Update

          try using the configuartion object works fine after you created the object
          Set objCDOSYSMail = Server.CreateOb ject("CDO.Messa ge")
          Thanks man that really helped
          it worked pretty fine
          thanks a lot

          Comment

          • r_o
            New Member
            • Jul 2006
            • 35

            #6
            Originally posted by wsrinivas
            Hope

            W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.


            This will help you
            It really did
            it seems i had to use the remote server's (my network mail server) ip address
            thanks a lot
            i appreciate it

            Comment

            • r_o
              New Member
              • Jul 2006
              • 35

              #7
              Originally posted by ilaiyaraja
              Hi if ur server have CDONTS object then u can use this code for mail
              set myMail=Server.C reateObject("CD ONTS.NewMail")

              myMail.To = "xxx@xx.com";"x xx@xx.com"
              myMail.from = "xxx@xx.com"(Th is field Mandatory)
              myMail.cc="xxx@ xx.com"
              myMail.Subject = "xxxxxxxxxxxxxx xxxxxxxx"
              myMail.Body="xx xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx "
              myMail.BodyForm at=0
              myMail.MailForm at=0
              myMail.send

              na CDONTS didnt work for me
              i think CDO is a newer and better technology
              i found the solution
              thanks for your concern

              Comment

              Working...