|
 |
asp_cdo thread: Send e-mail using CDONTS to a remote SMTP server
Message #1 by "Nathaniel Foster" <nfoster@s...> on Tue, 19 Jun 2001 16:18:34
|
|
Hi,
We have 2 servers here, 1 is for the Web page and the other for E-Mails
(Exchange). When i try to send a mail from my ASP page, all my messages
go to badmail folder of the WebPage. How can i tell my ASP page to send
mail from my mail server (using the network) and not from my WebServer who
can't send mail???
Message #2 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Tue, 19 Jun 2001 16:41:14 +0100
|
|
if you're using CDONTS then enable the smtp service on your webserver
and
your webserver will be able to send messages. If you want to send
messages
from your exchange server, you'll need to use CDO, and log into it.
Its much easier just to go with the first option if all you want to do
is
send messages rather than access individual mailboxes etc
-----Original Message-----
From: Nathaniel Foster [mailto:nfoster@s...]
Sent: 19 June 2001 17:19
To: ASP CDO
Subject: [asp_cdo] Send e-mail using CDONTS to a remote SMTP server
Hi,
We have 2 servers here, 1 is for the Web page and the other for
E-Mails
(Exchange). When i try to send a mail from my ASP page, all my
messages
go to badmail folder of the WebPage. How can i tell my ASP page to
send
mail from my mail server (using the network) and not from my WebServer
who
can't send mail???
Message #3 by "Nathaniel Foster" <nfoster@s...> on Tue, 19 Jun 2001 18:09:56
|
|
The SMTP in enable on my webserver but how can i tell to my webserver to
use my SMTP server to send mail?
My webserver is on win2k IIS5 and my mail server is on WinNt4 IIS4...
All i want to do is on an HTML page, the user fill a form and the result
are send by e-mail through an ASP page to my mail server.
> if you're using CDONTS then enable the smtp service on your webserver
> and
> your webserver will be able to send messages. If you want to send
> messages
> from your exchange server, you'll need to use CDO, and log into it.
>
> Its much easier just to go with the first option if all you want to do
> is
> send messages rather than access individual mailboxes etc
>
> -----Original Message-----
> From: Nathaniel Foster [mailto:nfoster@s...]
> Sent: 19 June 2001 17:19
> To: ASP CDO
> Subject: [asp_cdo] Send e-mail using CDONTS to a remote SMTP server
>
>
> Hi,
> We have 2 servers here, 1 is for the Web page and the other for
> E-Mails
> (Exchange). When i try to send a mail from my ASP page, all my
> messages
> go to badmail folder of the WebPage. How can i tell my ASP page to
> send
> mail from my mail server (using the network) and not from my WebServer
> who
> can't send mail???
>
Message #4 by "Siegfried Weber" <sweber@c...> on Tue, 19 Jun 2001 20:41:02 +0200
|
|
CDONTS cannot submit messages to a remote mail server. It requires a
local SMTP server running. If you want to do remote mail submission you
have to resort to CDOSYS (aka CDO for Windows 2000).
Here's a little CDOSZS snippet just to get you started (note that you
need to either declare the constants or use a metatag as described on
MSDN to get the constants working):
Set objConfiguration =3D CreateObject("CDO.Configuration")
Set objFields =3D objConfiguration.Fields
With objFields
.Item(cdoSendUsingMethod) =3D cdoSendUsingPort
.Item(cdoSMTPServerPort) =3D 25
.Item(cdoSMTPServer) =3D "YourMailServer.YourDomain.Com"
.Update
End With
Set objMessage =3D CreateObject("CDO.Message")
With objMessage
Set .Configuration =3D objConfiguration
.From =3D "YourOriginator@Y..."
.To =3D "TheRecipient@T..."
.Subject =3D "YourSubject"
'.TextBody =3D "YourTextBody"
.Send
End With
</Siegfried>
> -----Original Message-----
> From: Nathaniel Foster [mailto:nfoster@s...]
> Sent: Tuesday, June 19, 2001 8:10 PM
> To: ASP CDO
> Subject: [asp_cdo] RE: Send e-mail using CDONTS to a remote
> SMTP server
>
>
> The SMTP in enable on my webserver but how can i tell to my
> webserver to
> use my SMTP server to send mail?
>
> My webserver is on win2k IIS5 and my mail server is on WinNt4 IIS4...
> All i want to do is on an HTML page, the user fill a form and
> the result
> are send by e-mail through an ASP page to my mail server.
>
> > if you're using CDONTS then enable the smtp service on your
> webserver =3D
> > and
> > your webserver will be able to send messages. If you want to send
=3D
> > messages
> > from your exchange server, you'll need to use CDO, and log into it.
> >
> > Its much easier just to go with the first option if all you
> want to do =3D
> > is
> > send messages rather than access individual mailboxes etc
> >
> > -----Original Message-----
> > From: Nathaniel Foster [mailto:nfoster@s...]
> > Sent: 19 June 2001 17:19
> > To: ASP CDO
> > Subject: [asp_cdo] Send e-mail using CDONTS to a remote SMTP server
> >
> >
> > Hi,
> > We have 2 servers here, 1 is for the Web page and the other for
=3D
> > E-Mails=3D20
> > (Exchange). When i try to send a mail from my ASP page, all my =3D
> > messages=3D20
> > go to badmail folder of the WebPage. How can i tell my ASP
> page to =3D
> > send=3D20
> > mail from my mail server (using the network) and not from
> my WebServer =3D
> > who=3D20
> > can't send mail???
> >
Message #5 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Wed, 20 Jun 2001 09:41:13 +0100
|
|
I don't understand why you want to involve your mail server... if all
you're
doing is sending a message, you don't need it. If you ensure the SMTP
service is running on your IIS server, you can use this code to send a
message:
Set oCDONTSMail =3D Server.CreateObject("CDONTS.NewMail")
With oCDONTSMail
.From =3D sFrom
.To =3D sRecipient
.Subject =3D sSubject
.Body =3D sBody
End With
oCDONTSMail.send
Set oCDONTSMail =3D Nothing
(assuming sFrom, sRecipient, sSubject, sBody are strings containing the
relevant info)
-----Original Message-----
From: Nathaniel Foster [mailto:nfoster@s...]
Sent: 19 June 2001 19:10
To: ASP CDO
Subject: [asp_cdo] RE: Send e-mail using CDONTS to a remote SMTP server
The SMTP in enable on my webserver but how can i tell to my webserver
to
use my SMTP server to send mail?
My webserver is on win2k IIS5 and my mail server is on WinNt4 IIS4...
All i want to do is on an HTML page, the user fill a form and the
result
are send by e-mail through an ASP page to my mail server.
> if you're using CDONTS then enable the smtp service on your webserver
=3D
> and
> your webserver will be able to send messages. If you want to send
=3D
> messages
> from your exchange server, you'll need to use CDO, and log into it.
>
> Its much easier just to go with the first option if all you want to
do =3D
> is
> send messages rather than access individual mailboxes etc
>
> -----Original Message-----
> From: Nathaniel Foster [mailto:nfoster@s...]
> Sent: 19 June 2001 17:19
> To: ASP CDO
> Subject: [asp_cdo] Send e-mail using CDONTS to a remote SMTP server
>
>
> Hi,
> We have 2 servers here, 1 is for the Web page and the other for
=3D
> E-Mails=3D20
> (Exchange). When i try to send a mail from my ASP page, all my =3D
> messages=3D20
> go to badmail folder of the WebPage. How can i tell my ASP page to
=3D
> send=3D20
> mail from my mail server (using the network) and not from my
WebServer =3D
> who=3D20
> can't send mail???
>
Message #6 by "Nathaniel Foster" <nfoster@s...> on Wed, 20 Jun 2001 15:48:33
|
|
Oh well, It's ok now, i reinstalled the IIS service on the server and all
works. Thx all of us!!
Message #7 by "Kamran" <user_15@h...> on Thu, 28 Jun 2001 20:31:24
|
|
To Siegfried
I have tried using the mail submission as pointed but get the following
code error
Error Type:
(0x8004020F)
Any ideas
Kamran
user_15@h...
Message #8 by "Siegfried Weber" <sweber@c...> on Thu, 28 Jun 2001 22:14:48 +0200
|
|
Did you add the metatag/constants as I mentioned in my previous message?
It must look like this (line breaks added by mail reader):
<!--METADATA TYPE=3D"typelib"
UUID=3D"CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME=3D"CDO for Windows 2000 Library" -->
<!--METADATA TYPE=3D"typelib"
UUID=3D"00000205-0000-0010-8000-00AA006D2EA4"
NAME=3D"ADODB Type Library" -->
<Siegfried/>
> -----Original Message-----
> From: Kamran [mailto:user_15@h...]
> Sent: Thursday, June 28, 2001 10:31 PM
> To: ASP CDO
> Subject: [asp_cdo] RE: Send e-mail using CDONTS to a remote SMTP
server
>
> To Siegfried
>
> I have tried using the mail submission as pointed but get the
following
> code error
>
> Error Type:
> (0x8004020F)
>
> Any ideas
>
> Kamran
> user_15@h...
>=20
|
|
 |