Re: blat within batch script - not running
| Newsgroups | gmane.mail.blat |
|---|---|
| Message-ID | <B417B51A09E64FD88AA0EB9BBD5C372D@chip> |
> IMHO - > I believe that where you have the quotes in your set commands is OK, but > the spaces around the equal signs is not. You show in your email > >> set to = "-to eMail\@MyDomain.com" >> set f = "-f eMail\@MyDomain.com" >> set server = "-server smtp.MyDomain.com" > > I would instead code > Set to=”eMail\@MyDomain.com” > Set f=”-f eMail\@MyDomain.com” > Set server=”-server smtp.MyDomain.com” > > A SET command without any parameters will display the contents of all the > environment variables so you can check to see if they are set as you wish. > > Good luck > Ernest The issue with your method is that those quotation marks are passed to Blat directly, and the C command line pre-parser will treat the data within those quotation marks as a single entity. Blat does not have any option "-to email\@mydomain.com", but it does have an option "-to". If you put the quotation marks immediately before the environment variable as I had shown, then the environment variable does not carry the quotation marks, thus Blat would be given all parts of the environment variable content and that would be treated properly by the C command line pre-parser. The correct way to get spaces embedded into his data would be to have the set commands as I have shown: set "to=-to [email protected]" set "f=-f [email protected]" set "server=-server smtp.MyDomain.com" Make sure there are no spaces before the equals sign, because spaces there can create different environment variables than intended. Chip