Client Login Area
Main Menu
Results 1 to 2 of 2

Thread: help with new email changes. Trying to email from my site.

  1. #1
    Unverified User
    Join Date
    September 11, 2008

    Default help with new email changes. Trying to email from my site.

    Here is the code I was using to send email and text prior to the change.
    Can anyone help me modify this so it will work again?

    Imports Microsoft.VisualBasic
    Imports System.Web.Mail
    Imports System.Data
    Imports System.Data.SqlClient

    Public Class Mailer
    Public Shared Sub SendMessage(ByVal sTo As String, ByVal sSubject As String, ByVal sBody As String, Optional ByVal sMailedBody As String = "")

    'We want to send an email notification to the registrant.
    Dim msg As New System.Net.Mail.MailMessage()

    'Clause stating "Don't reply to this"
    Dim sBodyEnder As String = ""

    'Add Your SMTP Client server url or ip
    Dim smtp As New System.Net.Mail.SmtpClient("")

    'From Email ID

    Dim fromadx As New System.Net.Mail.MailAddress("" , "ABC")
    msg.From = fromadx

    'To Email ID
    Dim toadx As New System.Net.Mail.MailAddress(sTo)

    'Set to HTML for link usage
    msg.IsBodyHtml = True

    msg.Subject = sSubject

    sBodyEnder = "<br><br><br>Do not reply to this email. <br>If you wish to respond, please go to the site, login, and respond from your messaging area. <br><br>Responding to this email will not be received by anyone."

    If Len(sMailedBody) > 0 Then
    msg.Body = "<br><br>" & sMailedBody & sBodyEnder & "<br><br>"
    msg.Body = "<br><br>" & sBody & sBodyEnder & "<br><br>"
    End If

    'Send the message

    End Sub

    End Class

  2. #2
    ASPnix Administration Roma's Avatar
    Join Date
    June 27, 2005
    Denver, CO


    Replace with
    Friendly ASPnix Administrator

    ASPnix on Facebook

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts