Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. SMTP Help !!!

SMTP Help !!!

Scheduled Pinned Locked Moved ASP.NET
helpsysadmindata-structuresdiscussion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    payback
    wrote on last edited by
    #1

    Hi all, There is a problem i am facing and stuck in it.I am trying to send email from my aspx page using my company smtp mail server.i am using the following code. ''''''''''''-------------------------------------'''''''''''''' Dim oMsg As New MailMessage() Try oMsg.From = txtFrom.Text oMsg.To = txtTo.Text oMsg.Subject = txtSubject.Text oMsg.Body = txtBody.Text SmtpMail.SmtpServer = "CompanySMTPServer" SmtpMail.Send(oMsg) lblmsg.Text = "Message Send Successfully." Catch ex As Exception lblmsg.Text = ex.Message End Try ''''''''''''-------------------------------------'''''''''''''' i am getting this error. Could not access 'CDO.Message' object. I have gone through several of my hits on google about this and tried some hints. there are few things. 1- If i give "localhost" in place of smtp server then mail is successfully sent this means code is fine but it resides in Mailroor\queue as i have no access to DNS server. 2-I am using this smtp server "CompanySMTPServer" in my outlook so this means its workin fine. Could anyone take forward my discussion. i will be grateful. Thanks payback

    T 1 Reply Last reply
    0
    • P payback

      Hi all, There is a problem i am facing and stuck in it.I am trying to send email from my aspx page using my company smtp mail server.i am using the following code. ''''''''''''-------------------------------------'''''''''''''' Dim oMsg As New MailMessage() Try oMsg.From = txtFrom.Text oMsg.To = txtTo.Text oMsg.Subject = txtSubject.Text oMsg.Body = txtBody.Text SmtpMail.SmtpServer = "CompanySMTPServer" SmtpMail.Send(oMsg) lblmsg.Text = "Message Send Successfully." Catch ex As Exception lblmsg.Text = ex.Message End Try ''''''''''''-------------------------------------'''''''''''''' i am getting this error. Could not access 'CDO.Message' object. I have gone through several of my hits on google about this and tried some hints. there are few things. 1- If i give "localhost" in place of smtp server then mail is successfully sent this means code is fine but it resides in Mailroor\queue as i have no access to DNS server. 2-I am using this smtp server "CompanySMTPServer" in my outlook so this means its workin fine. Could anyone take forward my discussion. i will be grateful. Thanks payback

      T Offline
      T Offline
      Thea Burger
      wrote on last edited by
      #2

      Hi, Have you had a look at this site? Dedicated to System.Web.Mail? :) HTH, Thea

      M 1 Reply Last reply
      0
      • T Thea Burger

        Hi, Have you had a look at this site? Dedicated to System.Web.Mail? :) HTH, Thea

        M Offline
        M Offline
        Mike Ellison
        wrote on last edited by
        #3

        Hi Thea. That looks like a great resource... I wish I knew about it about a year ago when I struggled through these same issues!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups