aspNetEmail - Help please

Discussion in 'ASP.NET / ASP.NET Core' started by CharleyC, Jul 22, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I'm trying to develop a VB.NET application that uses aspNetEmail. I looked at the KB article Q10247. I'm having trouble with the "assembly name" and "import namespace" lines at the top of the example. They are:


    <%@ Assembly name="aspNetEmail, Version=3.0.0.0, Culture=neutral,


    PublicKeyToken=bc571e8da1c1f543" %>


    <!--- The above line can be omitted, if you load the assembly in the application web.config file. See KB article 10239 for details -->


    <%@ import Namespace="aspNetEmail" %>


    VB doesn't like the <%@ when I try to enter this code in the code-behind VB script for page load. Also, I tried putting the "assembly name" in the Web.Config file as:


    <assemblies>


    <add assembly="aspNetEmail, Version=3.0.0.0, Culture=neutral, PublicKeyToken=bc571e8da1c1f543"/>


    </assemblies>


    I read something about assembly references in the global.asax file. Do I need to add something there?


    Sorry - I'm sure this is a rookie issue...


    Thanks for your help!


    Charley
     
  2. I got it working. Lessons I learned (in case others have the same issue):


    - Download/install aspNetEmail from


    http://www.advancedintellect.com/download.aspx#smtp


    - Update Web.Config


    <assemblies>


    <add assembly="aspNetEmail, Version=3.0.0.0, Culture=neutral, PublicKeyToken=bc571e8da1c1f543"/>


    </assemblies>


    - Add aspNetEmail.dll as a "Reference" in your Solution


    - Upload aspNetEmail.dll to your \bin directory. Explanation from tech support is:


    We do not have version 3.1.5 installed on our server. The license for 3.x is installed on the server, you should be able to upload the trial dll to the bin directory and it should pick up the license.


    - Sample Code:


    Private Sub EmailLog(ByVal UserName As String, ByVal sClientID As Double)


    ' Set SMTP Host as localhost


    Dim msg As EmailMessage = New EmailMessage("localhost")


    'set the from address


    msg.FromAddress = "[email protected]"


    'set the to address


    msg.To = "[email protected]"


    'Set email subject and body


    msg.Subject = "ASPNetEMail test"


    msg.Body = "this is my simple email."


    'send the email


    msg.Send()


    Response.Write("Mail Sent")


    End Sub
    ==================

    Good luck!
    Charley
     
  3. But if I'm referencing 3.0.0.0 in the Web.Config file, it shoudn't matter what version I downloaded on my machine to develop the page, right? Uploading a trial is not a good solution.
     
  4. Got tired of trying to make this aspNetEmail thing work with this host. Found out that there is a built in smtp sender in .NET called System.Web.Mail. It actually works.
     
  5. Bruce

    Bruce DiscountASP.NET Staff

    The way ASPNETEmail licensing works is very unique. Our servers are installed with the licensing key for 3.x version.

    When you upload your trial component, it will automatically look for the license file and function as a licensed version.

    And of course, system.web.mail class also work great.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  6. So let me ask a very obvious question. Why would one not choose to just use system.web.mail instead of a 3rd party component like aspNetEmail? I mean, we're just talking about smtp here, nothing fancy at all. The other obvious question is why would DiscountASP.NET purchse a license for aspNetEmail rather than just not promote the use of system.web.mail for their customers? I was a little disappointed that I had to do an exhaustive search to find a very simple solution.
     
  7. Bruce

    Bruce DiscountASP.NET Staff

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page