Translate from 2.0 to classic asp

Posted on 2008-11-09
Last Modified: 2012-06-27
I need the following code translated into classic ASP if possible
or a better piece of code (classic asp) for sending email from my hosting smpt server
where they require authentification

Dim objMM As New System.Net.Mail.MailMessage()

Dim msg as String = "OK"


    ' configure your mail appearance


    objMM.From = New System.Net.Mail.MailAddress("")

    objMM.IsBodyHtml = False

    objMM.Subject = " 2.0 test mail"

    objMM.Body = " 2.0 test mail body"

    ' define smtp and authentication credential

    Dim smtp As New System.Net.Mail.SmtpClient()

    smtp.Host = ""

    smtp.Credentials = New System.Net.NetworkCredential("","password")

    ' send the mail now


catch e as exception

    msg = e.message 

end try

	'Response.Write "Message sent to " & strTo & "!"

	Response.Write "Your message has been sent. Thank You!"

End If

' End page logic


Open in new window

Question by:khlauster
    1 Comment

    Accepted Solution

    Marked as neglected..
    very well

    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
    I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now