The script is a bit convoluted and with the "On Error" you will never see an error message when one occurs. Running long term automation attachments with Excel is known to cause issues of hanging and memory corruption. Office programs are not intended to be used this way. That will not effect this.
The default timeout is already People do this all of the time. They blindly set defaults to the default. In this case it is a result of Microsoft publishing an example that did this. With a small message or with one message this is not necessary. If you are sending messages with very large attachments over a slow link then this can help with some very old SMTP servers. Current servers reset the timeout on every successful packet.
On net messaging the timeout is not even easily set because it iss almost never used with modern messaging systems. It was the first attempt at a MAPI.
The other thing that my version does that will help is that it does not keep the SMTP server object sitting in memory. It creates it and uses it then removes it a side effect of using a function.
IT generates the object, uses it and discards it. The files will be created on the spooler. They will have the current create time they will not have the AS time except if the are sent via SMB which I doubt. Are these files in the spooler or are they waiting for another process to print them? You are not very clear about what you are trying to do.
Don't run the loop. Schedule the script to run every 15 minutes. Stuck files and hung queues. You fail to define what you mean by these terms. On the print spooler set "Hold mismatched files" and many of your spooler isues will disappear.
I posted that already. It is even shorter than that. Why all of the time math. It is not necessary. Use DateDiff. If a system is sending files with no names then something is wrong. You will have collisions and issues. More likely your disk is corrupt and the directory has broken long names. Run a repair on the disk for beginners.
You have a number of issues in how you write code. Your code lacks any indenting and does not properly use spaces in string variable concatenation. Without then the parser can have weird intermittent failures. Never use On Error at the beginning of a script. Use it where you think you will get an error and catch the error. Remember to turn off error handling after checking for the error.
See "Learn" inks for more articles on error handling. You should place an error trap inside the SendMailMessage function and report the error to the log. We did this hours ago. Please read the whole thread. The thread has been marked as answered As per stated in my message, it's just some comments. The 3 points that I have made were not discussed point 1 maybe, but not the others.
Use DateDiff Is there an alternative to this using the classic ASP code We are upgrading the site to. Chris Patterson Senior Systems Engineer. Join our community to see this answer! Unlock 1 Answer and 4 Comments. Andrew Hancock - VMware vExpert. See if this solution works for you by signing up for a 7 day free trial. What do I get with a subscription?
With your subscription - you'll gain access to our exclusive IT community of thousands of IT pros. We can't always guarantee that the perfect solution to your specific problem will be waiting for you. If you ask your own question - our Certified Experts will team up with you to help you get the answers you need. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Ask Question. Asked 6 years, 6 months ago. Active 6 years, 6 months ago. Viewed 2k times. Send ; This script sends an e-mail correctly on my original server.
Send : Exception calling "Send" with "0" argument s : "The "SendUsing" configuration value is invalid. Improve this question. Steve Rukuts Steve Rukuts 8, 3 3 gold badges 44 44 silver badges 69 69 bronze badges. Add a comment. Active Oldest Votes. Enter the groups you want to give access to. If you could find that somewhere you'd be able to perform the above steps like so: cscript metaacl. Improve this answer. Sign up or log in Sign up using Google. Sign up using Facebook.
Sign up using Email and Password.
0コメント