SMTP SERVER Configuration!

This is a discussion on "SMTP SERVER Configuration!" within the Classic ASP section. This forum, and the thread "SMTP SERVER Configuration! are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Mar 5th, 2004, 04:18
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,602
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Send a message via Yahoo to Monie
SMTP SERVER Configuration!

ok....
here is the situation!

I am a final year student studying Information Technology!
For my final year project, I will be developing an ASP page that will be used "LOCALLY", in mean intranet, LAN!

I already install IIS, as well as the SMTP on my windows 2000 machine! I have created a page (form.htm) that will ask the user input (name, address...etc)
After they click the submit botton, all the information will be send to my email (myemail@yahoo.com)!

I had also created the CDONTS code "link" to the (form.htm) page! At the moment, when i tried to submit the form, all the information will go to queuing in C:\Inetpub\mailroot\Queue, and sometimes Badmail!

Nothing is comming up in my yahoo mail!
My university is not using SMTP server, instead they are using Exchange Server! i dont know what that is

1. Is there any extra CONFIGURATION that I should make (SMTP SERVER)???
2. Can SMTP/CDONTS support other mail such as yahoo,hotmail....or it just support the domain email

3. Do I have to change anything with the CDONTS script in order to make this working?

------------------------------------------------------------------
[Here is the (form.htm) page:]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<form name="form1" method="post" action="sendmail.asp">
<table width="500" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="145">Name:</td>
<td width="349"><input name="frmName" type="text" id="frmName"></td>
</tr>
<tr>
<td>Date:</td>
<td><input name="frmDate" type="text" id="frmDate"></td>
</tr>
<tr>
<td>Room to book:</td>
<td><input name="frmRoomToBook" type="text" id="frmRoomToBook"></td>
</tr>
<tr>
<td>Booking Date:</td>
<td><input name="frmBookingDate" type="text" id="frmBookingDate"></td>
</tr>
<tr>
<td>Email:</td>
<td><input name="frmEmail" type="text" id="frmEmail"></td>
</tr>
<tr>
<td><input type="submit" name="Submit" value="Submit"></td>
<td> </td>
</tr>
</table>
</form>
</body>

</html>


-------------------------------------------------------------------
[Here is the sendmail.asp page (Cdonts script)]

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%option explicit%>
<%
dim vName, vDate, vRoomToBook, vBookingDate, vEmail, x

' Collect form data and put them into the variables declared
vName = request.Form("frmName")
vDate = request.Form("frmDate")
vRoomToBook = request.Form("frmRoomToBook")
vBookingDate = request.Form("frmBookingDate")
vEmail = request.Form("frmEmail")

' Now, let's check that all the fields have some input before sending the mail
' We do this by iterating through the FORM-collection
' First, count the number of form-items posted to this page

dim iFrmCount
iFrmCount = request.form.count

'Now, iterate through the collection and stop processing if any of the fields are emtpy
For x = 1 to iFrmCount
if request.form(x) = "" then
'An empty field was found, ouput this to the user and stop further execution of this page.
%>
You did not fill out all the form-fields. Please click the back-button in your browser and correct this before continuing.
<%
response.End()
end if
next

'Ok, all form-fields checked out, now create the email using CDONTS
dim vEmailBody

Dim ObjMail
Set ObjMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = vEmail
objMail.To = "your@emailaddress.here" 'Change this, obviously
objMail.Subject = "Booking from " & vName
vEmailBody = "This is an automatically generated mail using CDONTS." & vbCrLf
vEmailBody = vEmailBody & "Customer Name: " & vName & vbCrLf & "Customer Email: " & vEmail & vbCrLf
vEmailBody = vEmailBody & "Order date " & vDate & vbCrLf & "Which room to book " & vRoomToBook & vbCrLf
vEmailBody = vEmailBody & "Booking Date: " & vBookingDate & vbCrLf & vbCrLf
vEmailBody = vEmailBody & "This is the end of the mail"
objMail.body = vEmailBody
objMail.Send

Set objMail = Nothing

' Mail is sent, all is good and well, output confirmation to user
%>
Hey <%=vName%>,

thank you for your order. We'll contact you as soon as possible.
-------------------------------------------------------------------
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)

  #2 (permalink)  
Old Mar 5th, 2004, 06:19
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Yahoo, hotmail sometimes have anti-spam filters that trap CDONTS email, so that's one possibility. But I don't think that's the problem here.

First off I'd set up Outlook or whatever to try to send email using your local SMTP server. If you can get this to work then the problems in your script - if not it's the setup of your SMTP. Also, if you're going through a firewall or proxy server at any point there's a chance that port 25 is blocked.

I'd also check to see what's being sent back when you send the email by doing:

Response.Write(objMail.Send)

That might give you some useful info.
  #3 (permalink)  
Old Mar 5th, 2004, 08:00
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Has the SMPT service been stopped in IIS?

u2o
  #4 (permalink)  
Old Mar 5th, 2004, 11:41
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,951
Blog Entries: 7
Thanks: 7
Thanked 3 Times in 3 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
I guess you want to configure your SMTP server that is running as part of IIS, on a pro version (non-server) of 2000 or XP and that machine is not part of a network running exchange or other similar mail server.

ok (deep breath), here goes.

This is one of the many methods, but one I found to work.

First... we need to know the ip address of your ISP's mail server.
This would be the email account that comes with your dial-up / adsl.
open a command line (start > run > cmd)
Next ping your mail server by typing:- ping servername.com

This will return to you an ip address (among other things) of your mail server. write this down.

Next, open up the IIS manager. expand the local computer node, and then right click on SMTP virtual Server, and select properties.

Click onto the Delivery tab, and then click the Advanced button at the bottom.

in the box that says 'smart host' put in the ip address of your mail server SURROUNDED WITH SQUARE BRACKETS!!!
EG. [132.143.11.0]

And thats it.

Restart IIS, and send yourself a nice 'welcome to CDONTS' email... :wink:
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
Closed Thread

Tags
smtp, server, configuration

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql configuration/setup help lcsaeteurn Databases 0 Apr 7th, 2008 03:29
SMTP/ Email need help! Compumaniac12 PHP Forum 2 Aug 23rd, 2006 23:51
Embed .swf in HTML with .JS configuration weisswolfen JavaScript Forum 0 Aug 12th, 2006 14:08
[SOLVED] New server configuration & now we can not run ASP. JSP & tml Anonymous User Classic ASP 1 Nov 8th, 2004 14:02
SMTP interface Webforumz Staff Classic ASP 6 Dec 8th, 2003 12:06


All times are GMT. The time now is 21:50.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43