Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - VBScript to send email not working on 1 server

Reply
 
Old 01-18-2009   #1 (permalink)
RemyMaza


 
 

VBScript to send email not working on 1 server

I have this script that works great on many machines except the one
I'd like to run it on. I think the problem lies with the fact that
the Security Config Wizard has been run on it. What do I need to turn
on in order for this to work? I have opened port 25 on the firewall
but that didn't really work. I think it's a service that I'll need to
start but I'm not sure which...

Function SendEmail(subject, body)
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "email@xxxxxx"
objEmail.To = "email@xxxxxx"
objEmail.Subject = subject
objEmail.Textbody = body

'Mail configuration
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
strMailserver
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") =
25
objEmail.Configuration.Fields.Update

'Send E-mail
objEmail.Send

'Write to the event log
Call WriteEvent(subject,body)

End Function


Thanks in advance...

Matt

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
can't send email - connection to server failed Vista mail
VBScript to send email not working on 1 server VB Script
Can't send email through POP3 server Browsers & Mail
Can't send email through POP3 server Vista mail
Windows mail can't send email but in XP/2000 pro. send working OK Vista mail


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46