I can send email in intranet with CDO.Message,but I wonder how to send email
to extranet ?

Re: how to send email to extranet by Pegasus

Pegasus
Tue Mar 25 01:37:18 CDT 2008


"£¤£¤£¤" <eagle@no.spam.net> wrote in message
news:OkfRwVijIHA.4244@TK2MSFTNGP06.phx.gbl...
>I can send email in intranet with CDO.Message,but I wonder how to send
>email to extranet ?

You do it the same way. What's your current code?



Re: how to send email to extranet by £¤£¤£¤

£¤£¤£¤
Tue Mar 25 02:24:53 CDT 2008

It works well to send email to intranet email-box.
If I try to send email to a extranet email-box,the script will issue the
following information when it executes the last line " objEmail.send "

------ information---------
(null): The server rejected one or more recipient addresses. The server
response was: 554 Relay rejected for policy reasons.


####################VBS code#############
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "name@xxx.com.cn"
objEmail.To = "extranet@xxx.com.cn"

objEmail.Subject = "Server down"
objEmail.Textbody = "No longer accessible over the network."
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"192.168.0.1" 'this is mail server IP.
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Send



Re: how to send email to extranet by Pegasus

Pegasus
Tue Mar 25 02:51:47 CDT 2008


"£¤£¤£¤" <eagle@no.spam.net> wrote in message
news:usDQAlkjIHA.484@TK2MSFTNGP06.phx.gbl...
> It works well to send email to intranet email-box.
> If I try to send email to a extranet email-box,the script will issue the
> following information when it executes the last line " objEmail.send "
>
> ------ information---------
> (null): The server rejected one or more recipient addresses. The server
> response was: 554 Relay rejected for policy reasons.
>
>
> ####################VBS code#############
> Set objEmail = CreateObject("CDO.Message")
> objEmail.From = "name@xxx.com.cn"
> objEmail.To = "extranet@xxx.com.cn"
>
> objEmail.Subject = "Server down"
> objEmail.Textbody = "No longer accessible over the network."
> objEmail.Configuration.Fields.Item _
> ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
> objEmail.Configuration.Fields.Item _
> ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
> "192.168.0.1" 'this is mail server IP.
> objEmail.Configuration.Fields.Item _
> ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
> objEmail.Configuration.Fields.Update
> objEmail.Send
>

You've got most of the required stuff in your code but you need
to replace the SMTP server's IP address with name of your ISP's
SMTP server. Here is a modified version of your code. I have
tightened it up a little to make it more readable.

schema = "http://schemas.microsoft.com/cdo/configuration/"

Set objEmail = CreateObject("CDO.Message")
With objEmail
.From = "name@xxx.com.cn"
.To = "extranet@xxx.com.cn"
.Subject = "Server down"
.Textbody = "No longer accessible over the network."
' .AddAttachment "d:\Testfile.txt"
With .Configuration.Fields
.Item (schema & "sendusing") = 2
.Item (schema & "smtpserver") = "mail.SomeISP.com"
.Item (schema & "smtpserverport") = 25
.Item (schema & "smtpauthenticate") = cdoBasic
.Item (schema & "sendusername") = "name@xxx.com.cn"
.Item (schema & "sendpassword") = "SomePassword"
End With
.Configuration.Fields.Update
.Send
End With



Re: how to send email to extranet by £¤£¤£¤

£¤£¤£¤
Tue Mar 25 04:20:38 CDT 2008

Yes, Your code works well.

Now I'd ask a newbie's question.

Since the client application ,for example,notes client,can send email to the
extranet mailbox through the intranet email server .Why cannot the VBscript
do the same thing through the intranet email server?




Re: how to send email to extranet by Pegasus

Pegasus
Tue Mar 25 11:05:33 CDT 2008


"£¤£¤£¤" <eagle@no.spam.net> wrote in message
news:%230kItlljIHA.4376@TK2MSFTNGP04.phx.gbl...
> Yes, Your code works well.
>
> Now I'd ask a newbie's question.
>
> Since the client application ,for example,notes client,can send email to
> the extranet mailbox through the intranet email server .Why cannot the
> VBscript do the same thing through the intranet email server?
>

Can't tell since I haven't seen the script you use and since
I know nothing about your intranet server. I recommend
you make it a habit to post as much information as possible
when asking a question.



Re: how to send email to extranet by £¤£¤£¤

£¤£¤£¤
Tue Mar 25 20:27:59 CDT 2008

Ok,I will try to state my question in detail.

I have a domino server in intranet. Its IP is 192.168.0.1

The email client application, notes, can send email to yahoo email-box,while
the following script cannot. Why?

Does the smtpserver appointed in the script mean the destination mail
server?
If it is true,then what is the source mail server? I mean that notes client
sends mail through domino server,which mail server or service does the
script send mail through?


####################VBS code#############
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "name@xxx.com.cn"
objEmail.To = "extranet@yahoo.com.cn"

objEmail.Subject = "Server down"
objEmail.Textbody = "No longer accessible over the network."
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"192.168.0.1" 'this is mail server IP.
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Send






Re: how to send email to extranet by Pegasus

Pegasus
Wed Mar 26 05:01:46 CDT 2008

The script behaves like any other EMail client. See if you can
send mail from Outlook Express (for example) to your Yahoo
mail box via your intranet server, then use the same mail settings
for your script.


"£¤£¤£¤" <eagle@no.spam.net> wrote in message
news:%23o4wOCujIHA.5080@TK2MSFTNGP02.phx.gbl...
> Ok,I will try to state my question in detail.
>
> I have a domino server in intranet. Its IP is 192.168.0.1
>
> The email client application, notes, can send email to yahoo
> email-box,while the following script cannot. Why?
>
> Does the smtpserver appointed in the script mean the destination mail
> server?
> If it is true,then what is the source mail server? I mean that notes
> client sends mail through domino server,which mail server or service does
> the script send mail through?
>
>
> ####################VBS code#############
> Set objEmail = CreateObject("CDO.Message")
> objEmail.From = "name@xxx.com.cn"
> objEmail.To = "extranet@yahoo.com.cn"
>
> objEmail.Subject = "Server down"
> objEmail.Textbody = "No longer accessible over the network."
> objEmail.Configuration.Fields.Item _
> ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
> objEmail.Configuration.Fields.Item _
> ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
> "192.168.0.1" 'this is mail server IP.
> objEmail.Configuration.Fields.Item _
> ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
> objEmail.Configuration.Fields.Update
> objEmail.Send
>
>
>
>
>



Re: how to send email to extranet by Marty

Marty
Wed Mar 26 22:54:15 CDT 2008


In your previous posts, you have a line like this in your script which
sets smtpserver=192.168.0.1:

objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"192.168.0.1" 'this is mail server IP.


-----Original Message-----
From: £¤£¤£¤ [mailto:eagle@no.spam.net]
Posted At: Wednesday, March 26, 2008 9:26 PM
Posted To: microsoft.public.scripting.vbscript
Conversation: how to send email to extranet
Subject: Re: how to send email to extranet

Before sending mail from Outlook Express,I have to configure it ,for
example
POP3 server for incoming mail and SMTP server for outgoing
mail.However,it
seems that it is not necessary to set POP3 server and SMTP server in
script.Why?

In the attachment, you can see that outlook express uses
"smtp.citiz.net" to
send mail.
Since there is no smtp server configured in the script,how does the
script
send mail out?




--
Posted via a free Usenet account from http://www.teranews.com


Re: how to send email to extranet by £¤£¤£¤

£¤£¤£¤
Thu Mar 27 00:38:08 CDT 2008

To Marty:

192.168.0.1 is the IP of intranet mail server.

When I want to send mail to yahoo,it should use the IP of Yahoo mail server.

The two IP are of the destionation mail server.

I want to know why not configure the IP of source mail server in script just
like doing in Outlook express?



Re: how to send email to extranet by Pegasus

Pegasus
Thu Mar 27 03:36:42 CDT 2008


"£¤£¤£¤" <eagle@no.spam.net> wrote in message
news:O0Kxty8jIHA.1184@TK2MSFTNGP04.phx.gbl...
> To Marty:
>
> 192.168.0.1 is the IP of intranet mail server.
>
> When I want to send mail to yahoo,it should use the IP of Yahoo mail
> server.
>
> The two IP are of the destionation mail server.
>
> I want to know why not configure the IP of source mail server in script
> just like doing in Outlook express?

When you use Outlook Express, how do you configure it to
send mail to a Yahoo account via your intranet server?



Re: how to send email to extranet by £¤£¤£¤

£¤£¤£¤
Thu Mar 27 04:30:11 CDT 2008

Outlook Exrpres sends mail to a Yahoo account via the extranet mail server.

So..?



Re: how to send email to extranet by Pegasus

Pegasus
Thu Mar 27 05:39:09 CDT 2008


"£¤£¤£¤" <eagle@no.spam.net> wrote in message
news:e4CnV0%23jIHA.3400@TK2MSFTNGP03.phx.gbl...
> Outlook Exrpres sends mail to a Yahoo account via the extranet mail
> server.
>
> So..?

Fine. Do the same with your script. You already know
how to do it.

If you want to use your intranet mail server, test it first
with an Outlook Express client, then apply the same
settings to your script. If you cannot get it to work with
OE, post the question in an OE newsgroup.



Re: how to send email to extranet by £¤£¤£¤

£¤£¤£¤
Fri Mar 28 04:40:56 CDT 2008

I cannot understand your answer or you may not understand my question.

Firstly,I want to use two terms,destionation mail server and source mail
server.

For instance,I have two mail-box in the extranet.One is CITIZ mail-box and
the other is YAHOO mail-box.If I send email from CITIZ mail-box to yahoo
mail-box,CITIZ will be the source mail server.and YAHOO will be the
destionation mail server.

Back to my script,
"http://schemas.microsoft.com/cdo/configuration/smtpserver",the smtpserver
field is configured with destionary mail server. In this case , it is
"mta-v1.mail.vip.cnb.yahoo.com". Ok?

If I use outlook express to send mail from CITIZ to YAHOO,,I should set
outlook express with "smtp.CITIZ.net" for the outgoing mail.
You said that the script behaves like any other EMail client,but the script
works well without such a field as "smtp.CITIZ.net".

In other words, which is the source mail server when I use the script to
send mail?




Re: how to send email to extranet by Pegasus

Pegasus
Fri Mar 28 05:53:09 CDT 2008


"£¤£¤£¤" <eagle@no.spam.net> wrote in message
news:eKtcRfLkIHA.5160@TK2MSFTNGP05.phx.gbl...
>I cannot understand your answer or you may not understand my question.
>
> Firstly,I want to use two terms,destionation mail server and source mail
> server.
>
> For instance,I have two mail-box in the extranet.One is CITIZ mail-box and
> the other is YAHOO mail-box.If I send email from CITIZ mail-box to yahoo
> mail-box,CITIZ will be the source mail server.and YAHOO will be the
> destionation mail server.
>
> Back to my script,
> "http://schemas.microsoft.com/cdo/configuration/smtpserver",the smtpserver
> field is configured with destionary mail server. In this case , it is
> "mta-v1.mail.vip.cnb.yahoo.com". Ok?
>
> If I use outlook express to send mail from CITIZ to YAHOO,,I should set
> outlook express with "smtp.CITIZ.net" for the outgoing mail.
> You said that the script behaves like any other EMail client,but the
> script works well without such a field as "smtp.CITIZ.net".

The script requires this line for the receiving SMTP server:
.Item (schema & "smtpserver") = "smtp.CITIZ.net"



Re: how to send email to extranet by £¤£¤£¤

£¤£¤£¤
Mon Mar 31 00:04:26 CDT 2008

Do you mean that if I want to send mail from CITIZ to Yahoo,the script
should be as following?

####################VBS code#############
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "name@xxx.com.cn"
objEmail.To = "xxx@YAHOO.com.cn"

objEmail.Subject = "Server down"
objEmail.Textbody = "No longer accessible over the network."
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"smtp.CITIZ.net" 'Is this field for receiving SMTP server?
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Send



Re: how to send email to extranet by Pegasus

Pegasus
Mon Mar 31 00:51:22 CDT 2008

Yes.

"£¤£¤£¤" <eagle@no.spam.net> wrote in message
news:%2335XgyukIHA.2396@TK2MSFTNGP02.phx.gbl...
> Do you mean that if I want to send mail from CITIZ to Yahoo,the script
> should be as following?
>
> ####################VBS code#############
> Set objEmail = CreateObject("CDO.Message")
> objEmail.From = "name@xxx.com.cn"
> objEmail.To = "xxx@YAHOO.com.cn"
>
> objEmail.Subject = "Server down"
> objEmail.Textbody = "No longer accessible over the network."
> objEmail.Configuration.Fields.Item _
> ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
> objEmail.Configuration.Fields.Item _
> ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
> "smtp.CITIZ.net" 'Is this field for receiving SMTP server?
> objEmail.Configuration.Fields.Item _
> ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
> objEmail.Configuration.Fields.Update
> objEmail.Send
>
>



Re: how to send email to extranet by £¤£¤£¤

£¤£¤£¤
Mon Mar 31 09:40:47 CDT 2008

In other words, in stead of the destination mail server ,the smtpserver
field should be configured with source mail server. Is it right?