?
Solved

Translate from asp.net 2.0 to classic asp

Posted on 2008-11-09
1
Medium Priority
?
365 Views
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
thanx
<%
Dim objMM As New System.Net.Mail.MailMessage()
Dim msg as String = "OK"
 
try
    ' configure your mail appearance
    objMM.To.Add("tom@recipient.com")
    objMM.From = New System.Net.Mail.MailAddress("info@sender.com")
    objMM.IsBodyHtml = False
    objMM.Subject = "asp.net 2.0 test mail"
    objMM.Body = "asp.net 2.0 test mail body"
 
    ' define smtp and authentication credential
    Dim smtp As New System.Net.Mail.SmtpClient()
    smtp.Host = "mail.sender.com"
    smtp.Credentials = New System.Net.NetworkCredential("info@sender.com","password")
 
    ' send the mail now
    smtp.Send(objMM)
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

0
Comment
Question by:khlauster
1 Comment
 

Accepted Solution

by:
khlauster earned 0 total points
ID: 22937221
Marked as neglected..
very well
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses
Course of the Month13 days, 19 hours left to enroll

807 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