Send Email From a C# Class

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • spartacus
    New Member
    • Oct 2007
    • 4

    #1

    Send Email From a C# Class

    I have a webservice that is used to pull username and password from a SQL 2005 Express Database. In the event the user forgets I want them to be able to enter their email address and submit which will call a method of the webservice that will then query the database for that email address and then send and email to the address with a new password. I can do everything except get the email to run.

    I am doing this on my local machine and will eventually be moving it to a production machin.

    I have created a class CDOSys and then use all of the normal stuff for CDO but nothing goes. Can anyone help me?

    Do you have to use SMTP Server with CDYSYS?
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    Hi spartacus,

    Your question has been moved to the .NET Forum as it is not an appropriate question for the ASP Forum as per the Posting Guidelines.
    The ASP Forum is for classic ASP and VBScript questions and answers, .NET and it's related components/languages are discussed in this forum.

    moderator

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      Originally posted by spartacus
      I have a webservice that is used to pull username and password from a SQL 2005 Express Database. In the event the user forgets I want them to be able to enter their email address and submit which will call a method of the webservice that will then query the database for that email address and then send and email to the address with a new password. I can do everything except get the email to run.

      I am doing this on my local machine and will eventually be moving it to a production machin.

      I have created a class CDOSys and then use all of the normal stuff for CDO but nothing goes. Can anyone help me?

      Do you have to use SMTP Server with CDYSYS?
      I've never used CDO before.
      Have you seen this quick reference on how to send an email using .NET? I know this article's written for VB.NET but it can easily be used for a C# application...

      You're going to have to connect to an SMTP server in order to send an email...whether it be a local to the web server your webservice is hosted on or not.

      -Frinny

      Comment

      Working...