473,394 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

ASP Simple Email HELP!!!!!

So im trying to get rid of the mailto function and use ASP instead, but im very new to it and cant get it working!!! ARG I use server 2003 and IIS for my websites. Heres how i think it should work (please correct me).

I put in the html file/page a form where someone can type say there name, and that code should look something like this:

<html>
<body>
<form action="test.asp" method="get">
Name: <input type="text" name="fname" size="20" />
<input type="submit" value="Submit" />
</form>
</body>
</html>

then i create a separate file in the same directory called test.asp (name of file i used in code above, and this ASP code should look something like this:

<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="& fname &"
myMail.From="& fname &"
myMail.To="myemail@domain.com"
myMail.TextBody="& fname &"
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
'Name or IP of remote SMTP server
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
="smtp.domain.com"
'Server port
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _
=25
myMail.Configuration.Fields.Update
myMail.Send
set myMail=nothing
%>

but i keep getting an error in the browser like this:

error '8004020e'

/test.asp, line 18

Yes ASP is turned on in IIS.
One big thing ive thought of is, the smtp server that im using isnt local server on my machine. Its the smtp server i use for personal email and it requires my username and password, so im assuming thats why it cant send. I cant use a local (on my machine) smtp server because i live on a university and they block that. PLEASE HELP ME.

Regards,
Drew
Mar 30 '07 #1
0 1147

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Dynamo | last post by:
Hi I have used the following script within a simple form email to prevent the form being used from an external url. <?php $referer = $_SERVER; // Get the URL of this page $myurl=...
3
by: Steve | last post by:
Hi, I have a string that looks kinda like "Winner (121,10) blah blah blah Winner (10,400) blah blah Winner (103,4) blah blah..." I just want to extract the coordinate parts of the string...
5
by: Le, Thanh-Nhan | last post by:
Hi, I want to send a simple mail with C#. I have tried the following, but they don't work: - some solutions on CodeProject websites. - shellExecute(mailto:xxx@yyy.com?subject=aaa&body=bbb). ...
6
by: \jason via DotNetMonster.com\ | last post by:
currently i am doing a personal website and keep on changing the aspect... finally the finall decision is to have a login page (requirement in asp.net, vb.net) and the login with security part of...
11
by: samuelberthelot | last post by:
Hi, I've got 3 input HTML (dropdown lists) on my page. One for selecting a Month, one for the day, one for the year. Very simple... My problem is that I'd like to update the Days one according...
1
by: Bart Van der Donck | last post by:
Hello, In my application, I'm having a directory with a bunch of .eml files. It was my intention to read out with PHP this directory, make a list of it and show them as .eml links in the...
3
by: mturner64 | last post by:
I'm working on a simple web app to send email. Below is my code: Imports System.Net.Mail Partial Class _Default Inherits System.Web.UI.Page Protected Sub SubmitButton_Click(ByVal...
6
by: migi | last post by:
Hi! I'm newbie with ASP and I have a simple task to do. I should send email using IIS. So I created html-file, which calls asp.page: <html> <form action="test.asp" method="POST"> <input...
3
by: civettina | last post by:
Hi, I'm trying to send an email to' sample@sample.com' when a new row on my table contactform_con is inserted. Basically, when a person fills out the contact form (contactform_con) I want one...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.