Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > VBScript
| Search | Today's Posts | Mark Forums Read
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old September 30th, 2004, 10:27 PM
Registered User
 
Join Date: Sep 2004
Location: Singapore, Singapore, Singapore.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to md_haris
Default Sending email on win 2003 server

Have recently migrated our application from Win NT to Win 2003. SMTP server is not sending out emails. Made some code changes. But surprisingly, there is no errors, which makes it more harder to trace the problem. Any assistance is appreciated. My codes are below.


************************************************** *****************
Dim objMail
 MsgBox ("Test6b")
    'Set objMail = Server.CreateObject("CDO.Message")
    Set cdoMessage = Server.CreateObject("CDO.Message")
     MsgBox ("Test6c")

    objMail.From = strFrom
    objMail.To = strRecipient
    objMail.Subject = strSubject
    objMail.TextBody = strMessage

    'Send the email
    objMail.Send

    'Clean-up mail object
    Set objMail = Nothing

Reply With Quote
  #2 (permalink)  
Old October 1st, 2004, 09:23 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Is that you are using SERVER.CREATEOBJECT in VBSCRIPT? Or is that you are using this code in an ASP file?

If that is just a VBSCRIPT file, then remove SERVER keyweod from there. Just CreateObject is enough. That should be what you are missing.

Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection
Reply With Quote
  #3 (permalink)  
Old October 21st, 2004, 07:08 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I use this code to send email into our email group using an anonymous account...

Const cdoBasic = 1 'basic (clear-text) authentication

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Subject Line"
objMessage.Sender = "user@emaildomain.xxx"
objMessage.To = "recipient@emaildomain.xxx"
objMessage.TextBody = "Message text..."

'==This section provides the configuration information for the remote SMTP server.

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.emaildomain.xxx"

'Type of authentication, NONE, Basic (Base64 encoded), NTLM
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic

'Your UserID on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = "****"

'Your password on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "****"

'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

'Use SSL for the connection (False or True)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False

'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

objMessage.Configuration.Fields.Update


mmcdonal
Reply With Quote
  #4 (permalink)  
Old October 21st, 2004, 12:20 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi md_haris,

Has that issue been resolved?

Cheers!

_________________________
- Vijay G
Strive for Perfection
Reply With Quote




Similar Threads
Thread Thread Starter Forum Replies Last Post
-2147024769 Automation Error on MS Win Server 2003 NeilSc Pro VB 6 2 May 10th, 2007 08:07 AM
unidcode utf-8 in iis 6.0 win server 2003 cyus Classic ASP Components 0 September 22nd, 2005 04:45 AM
win server 2003 problem slavni Classic ASP Databases 6 April 13th, 2005 03:32 AM
Unable to login running on win server 2003 kiekar BOOK: ASP.NET Website Programming Problem-Design-Solution 2 May 6th, 2004 09:28 PM
Access is denied - run on Win Server 2003 jackchua BOOK: ASP.NET Website Programming Problem-Design-Solution 3 April 15th, 2004 05:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.