05-20-2014 02:07 PM
My computer has 32bit SAS 9.4 and 32bit MS Office Professional Plus 2010, and am trying to set up a program to automatically email users when it is run. I have two problems:
1. If I have MS Outlook open on my computer while the program is running, I get an error message window in SAS that pops up titled "Outlook Data File" and the message is: 'The file c:\users\......\*.ost' cannot be opened'.
2. If I close MS Outlook before I run the SAS program, it creates the email. However, when I open up MS Outlook, the email is just sitting in my 'outbox' until the program sends/receives. I'd like for the email to automatically be sent without my having to open MS Outlook.
One of my coworkers is able to use the exact same program and does not have either of these problems (the email is created and delivered as soon as the program is run, it does not matter if MS Outlook is open).
We've checked and we have the same settings in Tools->Options->System->communications->email. I am not sure if it matters, but we can't use SMTP, only MS Exchange Server. Has anyone else had this problem? Or can anyone point me in a general direction to figure it out?
This is an example of the code that I am using:
filename outbox email emailsys=mapi
subject='TEST EMAIL SUBJECT';
put 'BODY OF TEST EMAIL';
05-21-2014 02:16 AM
It is part of the email setup within SAS. By default a local SAS installation is connected to the local mail. When you have outlook that is outlook. Microsoft prevented to free use of that attempting to frustrate spammers using malware. What you are wanting is a direct connection to a mail-provider.
The SMTP protocol (port 25) is well known as the classic home provision. You must have the experience using that you are stuck to do that with you internet-provider. That is because by default there is not authentication/identification to the mail server in the original protocol. It is open. I said was (history) as it could be now. To use that kind of mailing options you are needing the latest version of SAS as they were behind with this.
SAS(R) 9.4 System Options: Reference, Second Edition (emailhost system option). Check you mail setting have been defined able to send mail with your mail-provider.
05-21-2014 08:50 AM
With the local versions of SAS, both of you could have different options set either in the config (sasv9.cfg) or in the autoexec.sas (if either of you use that).
Im not an exchange expert but I do know that we are able to use SMTP with our exchange server by placing the following option at the beginning of the sasv9.cfg file.
-emailhost [your exchange ip address]
-emailport [your exchange port number]
Hope this helps!
05-29-2014 09:52 AM
Thanks for the hints. I couldn't get it to work though, turns out I our 9.4 version is not local. Supposedly someone at my company is working on it...
[unrelated whining] I also can't open a SAS program into the program editor by double-clicking anymore... Apparently it's now a setting that I don't have rights to change... It's the tiny little things like this that make me miserable. I will now release my frustration by typing loudly for a few hours. [end unrelated whining]
05-29-2014 10:02 AM
I can not offer you a shoulder for the whining.
I understand what has happened. It is the server based approach Eguide and more (you cannot double click).
The nasty question is why you have not a guy you can talk to helping you. A cooperative SAS platform admin also with some "first stept at ..." docs .
06-09-2014 04:35 PM
Thanks Jaap & Eric, finding out what our SMTP server domain name got around the MAPI problems! Our SAS admin doesn't actually use SAS so I think he is not so familiar with some of the issues (and my whining is not high on his priority list :smileysilly: ).