cdosys 
Author Message
 cdosys

Hello-

I am trying to send an email from win2k via wsh and need to send it to a
remote smtp server. I have no idea how to specify a remote smtp server, I
can get this to work via cdonts with a local smtp server.

TIA

-Vijay



Sun, 02 May 2004 12:47:47 GMT  
 cdosys
From my Script FAQ http://www.*-*-*.com/

Const cdoSendUsingMethod =
" http://www.*-*-*.com/ ;Const
cdoSMTPServer =
" http://www.*-*-*.com/ ;Const
cdoSMTPConnectionTimeout=" http://www.*-*-*.com/
pconnectiontimeout"Const cdoSMTPServerPort =
" http://www.*-*-*.com/ ;Const
cdoURLGetLatestVersion =
" http://www.*-*-*.com/ ;
Set iMsg = CreateObject("CDO.Message")Set iConf =
CreateObject("CDO.Configuration")  Set Flds = iConf.Fields  With Flds   '
assume constants are defined within script file   .Item(cdoSendUsingMethod)
= 2 ' cdoSendUsingPort   .Item(cdoSMTPServer)        = "smtp_host.xyz.com"
.Item(cdoSMTPServerPort)= 25   .Item(cdoSMTPConnectionTimeout) = 10 ' quick
timeout   .Item(cdoURLGetLatestVersion)   = True   .Upda{*filter*}d WithWith iMsg


I've attached my web page"       .CreateMHTMLBody http://mypage
.AddAttachment "C:\files\mybook.doc"       .Send End With


Quote:
> Hello-

> I am trying to send an email from win2k via wsh and need to send it to a
> remote smtp server. I have no idea how to specify a remote smtp server, I
> can get this to work via cdonts with a local smtp server.

> TIA

> -Vijay



Sun, 02 May 2004 14:53:08 GMT  
 cdosys
Thanks Ian-

I got your code but can't seem to make it work. I am using:

Win2k SP2
WSH 5.6

error:
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another
code: 800A0BB9

Any Ideas?


Quote:
> From my Script FAQ http://www.*-*-*.com/

> Const cdoSendUsingMethod =
> " http://www.*-*-*.com/ ;Const
> cdoSMTPServer =
> " http://www.*-*-*.com/ ;Const

cdoSMTPConnectionTimeout=" http://www.*-*-*.com/
Quote:
> pconnectiontimeout"Const cdoSMTPServerPort =
> " http://www.*-*-*.com/ ;Const
> cdoURLGetLatestVersion =
> " http://www.*-*-*.com/ ;
> Set iMsg = CreateObject("CDO.Message")Set iConf =
> CreateObject("CDO.Configuration")  Set Flds = iConf.Fields  With Flds   '
> assume constants are defined within script file

.Item(cdoSendUsingMethod)
Quote:
> = 2 ' cdoSendUsingPort   .Item(cdoSMTPServer)        = "smtp_host.xyz.com"
> .Item(cdoSMTPServerPort)= 25   .Item(cdoSMTPConnectionTimeout) = 10 '
quick
> timeout   .Item(cdoURLGetLatestVersion)   = True   .Upda{*filter*}d WithWith
iMsg


> I've attached my web page"       .CreateMHTMLBody http://mypage
> .AddAttachment "C:\files\mybook.doc"       .Send End With



> > Hello-

> > I am trying to send an email from win2k via wsh and need to send it to a
> > remote smtp server. I have no idea how to specify a remote smtp server,
I
> > can get this to work via cdonts with a local smtp server.

> > TIA

> > -Vijay



Sun, 02 May 2004 22:31:07 GMT  
 cdosys
Looks like a line wrap problem in my post. It is at this URL...
http://www.*-*-*.com/
1&viewtype=2

Regards,
Ian


Quote:
> From my Script FAQ http://www.*-*-*.com/

> Const cdoSendUsingMethod =
> " http://www.*-*-*.com/ ;Const
> cdoSMTPServer =
> " http://www.*-*-*.com/ ;Const

cdoSMTPConnectionTimeout=" http://www.*-*-*.com/
Quote:
> pconnectiontimeout"Const cdoSMTPServerPort =
> " http://www.*-*-*.com/ ;Const
> cdoURLGetLatestVersion =
> " http://www.*-*-*.com/ ;
> Set iMsg = CreateObject("CDO.Message")Set iConf =
> CreateObject("CDO.Configuration")  Set Flds = iConf.Fields  With Flds   '
> assume constants are defined within script file

.Item(cdoSendUsingMethod)
Quote:
> = 2 ' cdoSendUsingPort   .Item(cdoSMTPServer)        = "smtp_host.xyz.com"
> .Item(cdoSMTPServerPort)= 25   .Item(cdoSMTPConnectionTimeout) = 10 '
quick
> timeout   .Item(cdoURLGetLatestVersion)   = True   .Upda{*filter*}d WithWith
iMsg


> I've attached my web page"       .CreateMHTMLBody http://mypage
> .AddAttachment "C:\files\mybook.doc"       .Send End With



> > Hello-

> > I am trying to send an email from win2k via wsh and need to send it to a
> > remote smtp server. I have no idea how to specify a remote smtp server,
I
> > can get this to work via cdonts with a local smtp server.

> > TIA

> > -Vijay



Mon, 03 May 2004 02:08:17 GMT  
 cdosys
Actually I did check out the site and experienced the exact same problem
when I copied the code from there (obviously I changed the email/server
parameters)


Quote:
> Looks like a line wrap problem in my post. It is at this URL...

http://www.*-*-*.com/
Quote:
> 1&viewtype=2

> Regards,
> Ian



> > From my Script FAQ http://www.*-*-*.com/

> > Const cdoSendUsingMethod =
> > " http://www.*-*-*.com/ ;Const
> > cdoSMTPServer =
> > " http://www.*-*-*.com/ ;Const

cdoSMTPConnectionTimeout=" http://www.*-*-*.com/
Quote:
> > pconnectiontimeout"Const cdoSMTPServerPort =
> > " http://www.*-*-*.com/ ;Const
> > cdoURLGetLatestVersion =
> > " http://www.*-*-*.com/ ;
> > Set iMsg = CreateObject("CDO.Message")Set iConf =
> > CreateObject("CDO.Configuration")  Set Flds = iConf.Fields  With Flds
'
> > assume constants are defined within script file
> .Item(cdoSendUsingMethod)
> > = 2 ' cdoSendUsingPort   .Item(cdoSMTPServer)        =
"smtp_host.xyz.com"
> > .Item(cdoSMTPServerPort)= 25   .Item(cdoSMTPConnectionTimeout) = 10 '
> quick
> > timeout   .Item(cdoURLGetLatestVersion)   = True   .Upda{*filter*}d WithWith
> iMsg
> > Set .Configuration = iConf       .To       = """User A""


- Show quoted text -

Quote:

going?
> > I've attached my web page"       .CreateMHTMLBody http://mypage
> > .AddAttachment "C:\files\mybook.doc"       .Send End With



> > > Hello-

> > > I am trying to send an email from win2k via wsh and need to send it to
a
> > > remote smtp server. I have no idea how to specify a remote smtp
server,
> I
> > > can get this to work via cdonts with a local smtp server.

> > > TIA

> > > -Vijay



Mon, 03 May 2004 12:03:31 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. CDOSYS help required - Urgent

2. CDOSYS - Hotmail and Yahoo not showing attachments

3. sending email with cdosys

4. CDOSYS problems

5. CDOSYS.DLL

6. CDOSYS.DLL

7. Help with CDOSYS

8. CDOSYS and XP

9. CDOSYS problems

10. Mail fro jscript under Win2000 (using CDOSYS.DLL?)

 

 
Powered by phpBB® Forum Software