regarding sending mail from batch file

November 24, 2015 at 05:15:46
Specs: Windows 7
I made the .vbs script and when i called that script from batch ran and then nothing, i dont know..where i am going wrong?

See More: regarding sending mail from batch file

Report •

November 24, 2015 at 08:47:43
Can you paste a copy of the script, please? Or a link to a screenshot?

You're basically asking us for a paint job but not telling us the color :)

20 years in IT and counting, baby
\m/ > < \m/

Report •

November 25, 2015 at 00:55:45
Const cdoSendUsingPickup = 1 'Send message using the local SMTP service pickup directory.
Const cdoSendUsingPort = 2 'Send the message using the network (SMTP over the network).

Const cdoAnonymous = 0 'Do not authenticate
Const cdoBasic = 1 'basic (clear-text) authentication
Const cdoNTLM = 2 'NTLM

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CDO Message"
objMessage.From = """Me"" <>"
objMessage.To = ""
objMessage.TextBody = "This is some sample message text..It was sent using SMTP authentication and SSL."

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

objMessage.Configuration.Fields.Item _
("") = 2

'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("") = ""

'Type of authentication, NONE, Basic (Base64 encoded), NTLM
objMessage.Configuration.Fields.Item _
("") = cdoBasic

'Your UserID on the SMTP server
objMessage.Configuration.Fields.Item _
("") = ""

'Your password on the SMTP server
objMessage.Configuration.Fields.Item _
("") = "mypassword"

'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("") = 465

'Use SSL for the connection (False or True)
objMessage.Configuration.Fields.Item _
("") = True

'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
objMessage.Configuration.Fields.Item _
("") = 60


'==End remote SMTP server configuration section==


when I used the same script from my personal laptop and used gmail in smtp server as:
objMessage.Configuration.Fields.Item _
("") = ""

and used my gmail id and password..its working fine...but when i am trying to run this script in my company and using the company's (wipro) email id and password it doesnt work.

the smtp server that i used here( is got by 'ping' in cmd what i am it correct?

message edited by namrata1

Report •

November 25, 2015 at 00:56:18
awaiting your reply :) thanks

message edited by namrata1

Report •

Related Solutions

November 25, 2015 at 07:45:10
The script itself looks good, I don't visually see any errors. If it is working outside of work, the only thing I can see wrong is maybe there is internal security at work from blocking this type of process.

If your work email can resolve via DNS, then the IP or the hostname should work fine. Yeah, this is real strange.

The only thing I can think of is security measures at work preventing this script from executing properly.

20 years in IT and counting, baby
\m/ > < \m/

Report •

Ask Question