Forum Moderators: open

Message Too Old, No Replies

Anyone know how to setup IIS5 to send to EMAIL using CDONT here help

CDONT help

         

midi25

3:43 pm on Dec 24, 2002 (gmt 0)

10+ Year Member



Hi I am running IIS5 on my Win2000 machine. I have a web page named mailform.htm and an asp script page named sendmail.asp using CDDONT.

At the moment when I submit my page the email goes into the queing file in C:\Inetpub\mailroot\Queue

I have SMTP installed on my pc.

I nothing is coming up in MS Outlook either.

I am stuck could someone please run me through the setup of SMTP in II5 if possible please. I may have gone wrong somewhere.

He is my code too.

<html>
<form method=post action=sendmail.asp>
From email: <input type=text name=sender><br>
<input type=hidden name=receiver
value=sl1210user@aol.com><br>
Subject: <input type=text name=subject><p>
Body: <textarea name=body></textarea><p>
<input type=submit>
</form>
</html>

<%
set mail=server.CreateObject("CDONTS.NewMail")
mail.From= Request("sender") ' like my.email.addr@comsoltech.com
mail.To = Request("receiver") ' like john.doe@comsoltech.com
mail.Subject = Request("subject")
mail.Body = Request("body")
mail.BodyFormat = 0 ' 0 = HTML, 1 = Plain
mail.MailFormat = 1 ' 0 = MIME, 1 = Text
mail.Importance = 1 ' 0 =High, 1 = Medium, 2 = Low
mail.Send
set mail=nothing
%>

pls help

tomasz

8:18 pm on Jan 6, 2003 (gmt 0)

10+ Year Member



Looks like you need to add remote domain to your SMTP Server.

1.Add new remote domain (smtpserver.mysite.com)
2.Under properties for new domain set outbound security (username,password)

semick

4:55 am on Jan 7, 2003 (gmt 0)

10+ Year Member



I have used CDONTS many times - are you sending mail back to your own domain? Many times SMTP cannot access the mail server which is behind the firewall from the DMZ [If you don't have this setup, then don't worry about it].

Many web sites which my company hosts I send test mail to a hotmail or yahoo account, or we have an alternative domain set up which allows us to send mail internally...(basically DNS for the alternative domain is an internal IP which lets SMTP not go through the DMZ out and back in again].

Basic things you can check - SMTP writes warnings and failures to the event logs. You can turn on logging in the IIS MMC and see what is happening also.

Mail should be dropped in inetpub\mailroot\pickup, [in fact you can compose an email in notepad and drop it here also]. if an attempt for delivery is made and fails, it then goes into the queue, and delivery is reattempted per your IIS/SMTP settings. If it continues to fail, it then ends up in badmail.

Scott