|
-
May 6th, 2003, 02:58 AM
#21
Junior Member
hey
OK OK... i thought it was working... well it send out an email supposedly.. i mean i have a virus scanner and it shows that an email is goin out... however i sent it like an hour ago and still havent recieved it in my email! whats wrong with it??? what am i doin wrong?
-
May 6th, 2003, 03:22 PM
#22
Ok, here's one configuration. It may seem a bit convaluted, but it will make for easy modifications. The batch file to execute via the scheduler will something like below. After this, I will break down each part for you.
[BATCH]
IF NOT EXIST C:\Program Files\NovaLogic\Delta Force 2\df2plyrs.sav goto FAIL
blat (file containing email body txt) -tf (file containing recip list) -s (Subject of email) -i (who email is from) -server (smtp server) -f (sender) -attach "C:\Program Files\NovaLogic\Delta Force 2\df2plyrs.sav"
copy "C:\Program Files\NovaLogic\Delta Force 2\df2plyrs.sav" "C:\Program Files\NovaLogic\Delta Force 2\df2plyrsold.sav"
del "C:\Program Files\NovaLogic\Delta Force 2\df2plyrs.sav"
goto END
:FAIL
blat (file with failure txt notice) -s "File send failure!" -i (from addr) -server (smtp server) -f (sender) -attach "C:\Program Files\NovaLogic\Delta Force 2\df2plyrsold.sav"
:END
[/BATCH]
The example I have given will check for the sav file in the specified directory, and if it's not there (first line), it will go to the fail section of the batch file and send you the old file with a subject of "File send failure." You could take this out - I am just showing you a possible function if you wanted. Also, you could just send an email stating that it failed without sending an old copy. With that in mind, you would get rid of the copy line, but you would need to make sure that the previous sav file is not in the directory since your program will probably be attempting to write a file with the same name. Depending on your application, that may cause problems, but maybe not. The blat command itself has been explained with the switches, then their function in the parentheses.
The "file containing email body txt" could say something like "Your file is attached."
The "file containing recip list" would have a line-by-line list of email addresses for the email to be sent to.
Everything else should be self-explanatory.
You should name this batch file with a ".bat" extension, and use the task scheduler to execute your blat batch file on a regular basis. You may be thinking : why not just plug the blat command into the scheduler? The answer is that it's too long (at least it is in Win2k, so probably in Win9x also).
By the way, make sure that you don't put in the [BATCH] AND [/BATCH] tags. I only put those in to show you where the batch file would begin. :P
Hope that helps!
t2k2
Opinions are like  holes - everybody\'s got\'em.
Smile 
-
May 6th, 2003, 09:53 PM
#23
Junior Member
hey
ok one last thing....
the batch file seems to be working properly... however i have one more problem.
blat C:\Program Files\NovaLogic\Delta Force 2\df2plyrs.sav -t [email protected] -s test -i [email protected] -server mail.rednine.net -f [email protected] -attach "C:\Program Files\NovaLogic\Delta Force 2\df2plyrs.sav"
when i try this at the promt... it says
c:\Program Files does not exist ?!@!@
so instead i just tried this... i saved a text file on c: called test.txt
i then tried this at the prompt...
blat c:\test.txt -t [email protected] -s testing -i [email protected] -server mail.rednine.net -f [email protected] -attach "C:\test.txt"
this was the output...
Sending c:\test.txt to [email protected]
Subject:testing
Login name is [email protected]
Attached binary file: C:\test.txt
so that worked... i got the file in my email!!
i wanna know why it couldnt find the other file in my directory...
if i remember correctly c:\Program Files... isnt writen the same on the command prompt...
cuz there are spaces... so its writen diff
any way i appreciate the batch file u made.. and all the help u have given me..
THANKS
-
May 6th, 2003, 09:57 PM
#24
Because of the long file names (I think), try it as c:\progra~1. That should work.
Cheers:
-
May 6th, 2003, 10:23 PM
#25
Junior Member
hey
why is it that sometimes the mail will go through.. other times it wont...
example i sent out 5 files with blat... then i sent out some more and i never recieved them however blat had sent them out... then i tried my other email address and server, and blat sent it out, however i didnt recieved it yet...
-
May 6th, 2003, 10:27 PM
#26
Well, off hand it doesn't sound like blat. Are you using different SMTP Servers and does one allow relaying and one not. E-mail's send via blat, may be considered as an attempted relay and therefore blocked by some SMTP servers.
Cheers:
-
May 6th, 2003, 10:35 PM
#27
Junior Member
hey
actually i just recieved the mails... i guess my mail servers can be slow sometimes...
anyway i still have one more problem...
i need to know how i can figure out how to locate this file on the command prompt...
c:\Program Files\NovaLogic\Delta Force 2\df2plyrs.sav
maybe if i download some kind of nes emulator... and go to that file it will show how it is exactly writen on the command prompt...
-
May 6th, 2003, 10:43 PM
#28
Again, I go back to the issue of long file name. I know for example Program Files is linked to progra~1. As for the others your going to have to check, Long file names get will be some version of the file name with ~1 at the end. For example at the command line at root, if you type in cd progra~1, you will end up in the program files directory.
Cheers:
-
May 6th, 2003, 11:18 PM
#29
Junior Member
ok i got it
ok i know what to do... its so easy...
instead of putin just c:\program files....
u gotta put it in quotes.. so it would look like this
"c:\program files\novalogic\delta force 2\df2plyrs.sav"
hahah its easy....
well! i want to thank everyone for all the support and help!
i really appreciate it! if i have any other problems or questions i will hollar back.
thanks again

ok ok one more last thing....
when i setup a scheduled task, lets says a weekly task...
what will happen if the user is not on the internet that day? or what will happen if the users computer isnt on? will the file still be sent with blat?? will it be sent the next day? how does that work? and if the computer isnt connected to the net and the task still runs! will the file be sent????
-
May 7th, 2003, 03:39 PM
#30
Ummm...indeago. I already showed you that you needed it in quotes in the sample batch file that I typed for you. Maybe I should have stressed that you needed them because of the space.
My bad.
I'm glad I could help! 
I can't take all the credit for it. It was something my boss and I worked on some time ago, but I'm glad it was able to help someone else. Each one teach one.
Cheers,
t2k2
Opinions are like  holes - everybody\'s got\'em.
Smile 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|