- What did you expect?
  Create an account
:: Home  ::  Downloads  ::  Your Account  ::  Forums  ::
Google Adsense
  • Home
  • Downloads
  • ExpectationReviews
  • Forums
  • Group29 FAQ
  • MovieReviews
  • OtherReviews
  • Stories Archive
  • Submit News
  • Top 10
  • Topics
  • Web Links
  • New at Group29
    ·Movie Review: Avengers: Infinity War [26]
    ·Movie Review: Incredibles 2 [25]
    ·2018 UCLA vs USC preview
    ·Expectation Review: Avengers: Infinity War [24]
    ·2017 USC vs UCLA preview
    ·Forum Topic: Update your Facebook property
    ·Expectation Review: Star Wars: The Force Awakens [29]
    ·Web Link: WEP Key Converter
    ·Forum Topic: Why does my IPA file get saved as a zip file in IE?
    ·Web Link: BeyondCompare

    ·Rebelscum Breast Cancer Awareness Charity Patch
    ·BBC Interviews J.J. Abrams About Trek And Wars
    ·CEII: Jabba's Palace Reunion - Massive Guest Announcements
    ·Fathead's May the Fourth Be With You!
    ·Star Wars Night With The Tampa Bay Storm Reminder
    ·Stephen Hayford Star Wars Weekends Exclusive Art
    ·ForceCast #251: To Spoil or Not to Spoil
    ·New Timothy Zahn Audio Books Coming
    ·SDCC: Exclusive Black Series Boba Fett With Han In Carbonite Set
    ·Star Wars Art Exposition May 4th

    Hot trends

    Group29 Discussion Board :: View topic - Sending Mail from An ASP.NET page using VB.NET
    Log in Register Forum FAQ Memberlist Search
    Ratings, Links, Free Speech and more

    Group29 Discussion Board Forum Index -> Group29 Tech Tips -> Sending Mail from An ASP.NET page using VB.NET
    Post new topic  Reply to topic View previous topic :: View next topic 
    Sending Mail from An ASP.NET page using VB.NET
    PostPosted: Tue Jan 25, 2005 2:55 pm Reply with quote
    Joined: Jun 23, 2004
    Posts: 340


    In a previous post, I had some sample code for sending an e-mail from an ASP page with inline code using the CDO objects for Windows 2000 and Windows 2003.

    I created a function, which I actually placed in an application class, to send e-mail from a feedback page.

    ' Send your message body here
     Public Sub FeedBackMail()
       Dim mSMTP As SmtpMail
       Dim MailCurrent As MailMessage
       MailCurrent = New MailMessage()

       Dim sFileNameOnly As String
       sFileNameOnly = ""
       ' Not currently implemented to attach files

       ' I had Set configuration for mail host in an XML config file
       ' this example is more abbreviated to show the workings
       'Assign mail attributes
       'Seperate multiple TO: email adresses with a comma seperator
       MailCurrent.To = ""
       ' From needs to be a valid email return address
       '  or Lotus Notes Mail will discard the message as SPAM
       MailCurrent.From    = "
       MailCurrent.Subject = "App Feedback from Web Site"
       MailCurrent.Body    = "this is the body of the e-mail"
       ' Need to use text as the mail body format
       ' for Lotus notes client
       MailCurrent.BodyFormat = MailFormat.Text

       ' File to mail? add it to the email
       If Len(sFileNameOnly) > 0 Then
       End If

            'Set SMTP server to configured host
            mSMTP.SmtpServer = ""
            ' by the way, this method does not work!
            ' mSMTP.SmtpServer.Insert(0, "")

            'Send mail
            mErrorMessage = ""

            Catch e As Exception
                ' Notify that no e-mail was sent
                mErrorMessage = "Error Sending e-mail:" & e.Message

            End Try
    End Sub
    View user's profile Visit poster's website
    Sending Mail from An ASP.NET page using VB.NET
      Group29 Discussion Board Forum Index -> Group29 Tech Tips
    You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot vote in polls in this forum
    All times are GMT - 6 Hours  
    Page 1 of 1  

     Post new topic  Reply to topic  

    Powered by phpBB © 2001-2003 phpBB Group
    Theme created by Vjacheslav Trushkin
    Forums ©
    Group29 Productions

    All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest (c) 2006 by Group29 Productions.

    You can syndicate Group29 Productions news with an RSS Feeder using the file backend.php

    PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
    Page Generation: 0.26 Seconds

    :: HeliusGray phpbb2 style by CyberAlien :: PHP-Nuke theme by ::