Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIS4 Error - Trying to send e-mail using ASP to SMTP 1

Status
Not open for further replies.

cichlid

Technical User
Oct 11, 2000
61
GB
Have a webserver using IIS4 - there is a page on it for contacting via e-mail (input your address and message, hit send).
As far as I can tell the code in the page works fine - it's been tested on other setups - SMTP works fine cos I can drop a manually created mail file into the pickup folder and it gets sent out - Each time I try and create a mail item using the asp page it returns an error 'there was an error processing the URL' (not even sure were the error is coming from).
Does anyone know of a solution other than re-installing everything? I don't want to take the box offline.
 
Are you running the virtual server/directory in a seperate memory space? If you are, take it out as it can't access the metabase which means it cannot use CDONTS. Otherwise, look at NTFS permission on the CDONTS.dll in WINNT\System32.
These are the basic starting oints. If this doesn't work, post again with the exact error message in its entirity and we'll see what we can do from there.

James :) James Culshaw
jculshaw@active-data-solutions.co.uk
 
James,
checked NTFS permissions - all looks okay - even tried giving IUSER full control - no joy.
The exact error message is "An error occurred on the server when processing the URL."
I've even tried copying cdonts.dll from a working machine and registering it on this one but still doesn't work.
At the minute I am considering reinstalling sp6a and if that doesn't work reinstall IIS4, then if all else fails, rebuild entire box but these all seem a bit drastic.
Whatever is happening, there is something getting in the way of creating the mail item.
Cheers, appreciate the help :)
Seán.
 
If it's any help the line that is supposed to create the mail item is below. I didn't write the code myself but I've tested it on a machine with the same setup (actually a staging server before updates get posted to the live one).
As far as I can tell, when you click the send button on the page it calls the code from an asp file - the important line (below) is the one I think that is giving the problem as the other parts of it function fine, ie error checking if you hit send without adding a message.
Can you suggest anything else I need to look at? Would reinstalling sp6a/iis4/nt server solve it?

set objMail = server.CreateObject ("CDONTS.NewMail")
objMail.Send strname,strwhoemail,"Message from Website",stremailmsg
 
use this code with the cdonts
it works
<code> set MyMail2=Server.CreateObject (&quot;CDONTS.Newmail&quot;)
MyMail2.Mailformat=0
MyMail2.Bodyformat=0
MyMail2.To= request.form(&quot;email&quot;)
MyMail2.From=&quot;webmaster@tripmedia.com&quot;
MyMail2.Subject=Request.Form(&quot;name&quot;)& &quot; -- Enquiry from the website&quot;
MyMail2.body = main2
MyMail2.send
set Mymail2=nothing </code>

regards ::)
 
Cracked it - Stopped and thought about what permissions I should check - I then realised that IIS would need to be able to write the email to the pickup folder in mailroot.
So now I've added permission for IUSR to the folder it can create the mail item - panic over. Thanks everybody for pushing me in the right direction.
:) Seán :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top