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.
|
|
|
|
|
![]() |
||
SMTP SERVER Configuration!
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
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)
|
|
|
|
|||
|
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. |
|
|||
|
Has the SMPT service been stopped in IIS?
u2o |
|
||||
|
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
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
![]() |
| Tags |
| smtp, server, configuration |
| Thread Tools | |
|
|
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 |