• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

ASP FORM SCRIPT help please

U

ukhosts

Guest
Hi,

We have been trying to get an asp form script to work but with no success.

All our previous scripts use CDONTS which is not supported.

We have tried other types but with no success.

Does anyone have a working asp from script that will work with Plesk7 or can anyone direct me to a working script.

Many thanks in advance.

Darryl
 
Use the CDOSYS method, i do! , it can also return useful error codes . i also think mailenable has it own api to do this as well but i don’t worry about this.

AndiC_UK
 
asp

Hi,

Thanks for that.

We have tried using CDOSYS but the code we are using does not work or just brings up errors.

Could you post the code and form you use?

Thanks again,

Darryl
 
here is a snipit from a script i wrote. set smtpServer = "localhost" and make sure mailenable is setup to allow the relay of messages from localhost without Authentication . The other variables explain themselves

set cdoMessage = Server.CreateObject("CDO.Message")
set cdoConfig = Server.CreateObject("CDO.Configuration")
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpServer
cdoConfig.Fields.Update
set cdoMessage.Configuration = cdoConfig
cdoMessage.From = fromAddr
cdoMessage.ReplyTo = replyTo
cdoMessage.To = recipients
cdoMessage.Subject = subject
cdoMessage.TextBody = body
on error resume next
cdoMessage.Send
if Err.Number <> 0 then
SendMail = "Email failed: " & Err.Description & "."
end if
set cdoMessage = Nothing
set cdoConfig = Nothing
exit function

AndiC_UK
 
I use the code above, however I notice that the mailenable dll required to use their API is not included in plesk's install of ME. Strange this really....

Do you have any problems with asp generated mail always sending to a local address (ie you have a Post Office of the domain in ME because you have this domain set up in plesk), when you are trying to use an external mail server? I had to delete the post offices for all domains that use an external mail server, not ideal!
 
addstravel

The method CDOSYS is apart of the Collaboration Data Objects (CDO) and has been built into windows for a while .

i suggest there is somthing wrong with the server setup

i know mailenable has its own api to do this .
ie create a mailenable object. But i know nothing about this and you should not need to use this.

""Do you have any problems with asp generated mail always sending to a local address""""

nope and i have all domains setup in plesk

""" when you are trying to use an external mail server?""""

If you mean send mail via a different mail server (i only use localhost) then i suggest you make sure that your firewall allows outbound connections on port 25
and i would check that the server does not use Authentication.. if it does then user and password lines need to be added to the code.

cdoMessage.item("http://schemas.microsoft.com/cdo/configuration/smtpauthenti
cate").value = 1 ' use clear text authenticate

cdoMessage.item("http://schemas.microsoft.com/cdo/configuration/sendpassword
").value ="mypassword"

cdoMessage.item("http://schemas.microsoft.com/cdo/configuration/sendusername
").value ="yourusername"

I also send mail from local host to the outside world no problem.

if you still having problems send me your logs and code with full examples.

AndiC
 
bmorejon

thats not a great deal of information to go on :rolleyes: , if your just on about ASP then make sure thats its configured to be allowed in the domains settings (in plesk).

i would also try uploading scripts to the domains account via ftp i.e not by copying them across etc on your server (because of permission problems)

i would also check IIS's setup

if all else fails get your provider to sort it out or hire a professional.

AndiC
 
CDONTS doesn't work.

One question: Can I install ASP components like ASPMAIL, ASPJPEG etc.. in my server with Plesk ?
 
dont use CDONTS use CDOSYS. The later returns useful error codes and stupports alot more stuff.

"""One question: Can I install ASP components like ASPMAIL, ASPJPEG etc.. in my server with Plesk ?""""

not used them .. but i dont see why not

AndiC
 
Can't I install the components ? :confused:

I'm affraid that it cause conflit with Plesk
 
Plesk does not use ASP itself , it just enables and disables it for each domain depending on the hosting plans you setup.

Plesk itself is made up from javascript, php and c/c++. It aslo runs on its own web server which is infact apache.

The hosting plans along with ASP is hosted on IIS.

You should have no problems !!!

If you are having problems please start a new forum thread with as much information as possbile.

AndiC_UK
 
I´ve installed some components and they seem to work. As a matter of fact, the components are installed in Windows, so it doesn´t matter if your using Plesk or other software...

I think it´s why the components work because if they depend on Plesk ....
 
As a matter of fact, the components are installed in Windows, so it doesn´t matter if your using Plesk or other software...

This had already been answered

But thanks for verifying it :)

AndiC_UK
 
I received an email from Plesk. They said I can install all ASP Componentes.

Do you know where I can download them for free ?
 
I received an email from Plesk. They said I can install all ASP Componentes.

we told you , you can :)

Do you know where I can download them for free ?

do a google search

eg
asp plugins
activex controls asp ... etc

what kind of plug in do you need ??
ie what do you need to do?

you can always write your own in visual basic , c/c++ and not forgeting all the .net stuff (C#)

bmorejon you should have created a new thread this thread was meant to be about asp email scripts only :mad: ... to late now


AndiC
 
Originally posted by AndiC_UK
here is a snipit from a script i wrote. set smtpServer = "localhost" and make sure mailenable is setup to allow the relay of messages from localhost without Authentication . The other variables explain themselves
AndiC_UK
How do you make sure mailenable is setup to allow relay of messages from localhost without authentication?
 
jahsh420

open the mailenable admin tool

got to connectors -> SMTP

right mouse on SMTP -> properties

under relay

tick allow mail relay

tick allow relay for authenticated senders

tick allow privilaged ip address ranges

click authentication button and make sure mailenable/integrated authentication is selected

click privileged ip button

make sure denied relay right is selected
(default for computers not in list)

make sure ip 127.0.01 is in list , if not add it

127.0.01 = localhost

AndiC_UK
 
Originally posted by AndiC_UK
jahsh420

open the mailenable admin tool

got to connectors -> SMTP

right mouse on SMTP -> properties

under relay

tick allow mail relay

tick allow relay for authenticated senders

tick allow privilaged ip address ranges

click authentication button and make sure mailenable/integrated authentication is selected

click privileged ip button

make sure denied relay right is selected
(default for computers not in list)

make sure ip 127.0.01 is in list , if not add it

127.0.01 = localhost

AndiC_UK
AAndiC_UK,
Thanks, all of these were there except for this:
"allow relay for authenticated senders"
I checked this now, we have a customer who is using CDONTS or CDOSYS, neither will send the email out from as asp form. Am I missing something? Do they need to use the mailenable api instead of CDONTS or CDOSYS? Do we need to do something with IIS to have them able to use them? Thanks in advance. I am a Linux guy, very new to Windows administration.
 
Back
Top