Posted on: 2/21/2014 3:09:46 AM | Views : 643

Hi, 
I would like to create a Windows Service to send mails automatically, however I need to access the emails from the ASP.NET Membership, here's the code how I already send the email
Imports System.Net.Mail Imports System.Net Imports System.IO Partial Class _Default Inherits System.Web.UI.Page Protected Sub CustomValidator1_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate If txtComments.Text.Length > 300 Then args.IsValid = False Else args.IsValid = True End If End Sub Protected Sub Wizard1_FinishButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles Wizard1.FinishButtonClick SendMail(txtEmail.Text, txtComments.Text) End Sub Public NotInheritable Class Emailer Private Sub N ...

Go to the complete details ...