05-16-2012 05:58 PM
For years, we have had SAS code that creates many emails using LotusNotes. We are now transitioning to Outlook 2010. The example SAS code follows my signature.
My html attachment is no longer rendering as the actual note. If another attachment exists, then the html file is an additional attachment. If there is only the html attachment, then it will render as the note. The beauty of using the html attachment for the note is that the non-SAS user has control of the note. For the short-term, I will create a PUT statements note. Double-Yuck!!!
Have others run into this issue with Outlook 2010? Aside: Like others posting to these discussion communities, I haven’t been able to get ODS HTML/HTML3 to create a note. The note is the HTML code.
filename outbox email 'nul';
subject="A Spiffy Report for &Region"
05-16-2012 10:40 PM
You can use ODS to write the body of the email in HTML. If you do, and want the code to render properly in Outlook 2010, you should use the HTML3 ODS destination. Discussion and sample code are available on the SAS Training Post blog: Jedi SAS Tricks: Email from the Front – Part 2
05-17-2012 03:35 PM
I should have elaborated on my third paragraph above, which is tied to your blog. I can't get your code to work, but thank you for all of the information and the video.
At this point, I am using SAS 9.3 (TS1M1) without the SMTP host or port specified. I have yet to find the right person to provide this information. Although I've tried, I haven't been able to figure out the version of Outlook 2010 that I am using.
05-17-2012 06:00 PM
I don't know if this will help, but I have an E-mail send that is structured a little bit differently, and includes TYPE='text/html' like example #2 in http://support.sas.com/resources/papers/proceedings11/300-2011.pdf. Cynthia says her E-mail is received on Outlook 2010, which is why I have posted this.
-EMAILHOST mail.myplace.com -emailsys smtp is set in our configuration file (proc options at the bottom).
Hope this helps...
DATA _NULL_ ;
FILENAME WEEKLYREP EMAIL
ATTACH=("&QA_REPORTS\WEEKLY_REPORT1.HTML" "&QA_REPORTS\WEEKLY_REPORT2.HTML" );
6 proc options GROUP=EMAIL ; run ;
SAS (r) Proprietary Software Release 9.2 TS2M3
Identifies the SMTP e-mail authentication protocol
NOEMAILFROM Do not require FROM= for SMTP email
SMTP server host for email access method
EMAILID= From E-mail address, log in id, or profile for use with underlying e-mail system
EMAILPORT=25 Port number for SMTP server for email access method
EMAILPW=xxxxxxxx Used by the E-mail Access Method and Send menu item to set the email session login password for the underlying e-mail system
EMAILDLG=NATIVE Used by Send menu item to set the email dialog interface.
EMAILSYS=SMTP Used by E-mail Access Method and Send menu item to set the interface type with underlying e-mail system.
05-18-2012 11:51 AM
To find out your Outlook 2010 version, go to file --> help
and the version will be displayed in the right panel. There is also a link for additional version information.
I use SMTP to e-mail and you do need the hostname to make it work. The IT folk who support the Exchange servers will know the name and necessary connect information for your SMTP host (Exchange also uses it to send e-mail outside of your organization.). You need to talk to the server support people (Exchange), not the client side support people (Outlook).
12-26-2014 04:54 AM
Kim do not focus on Outlook as it is the client not the mailserver.
When organizing sending mail focus on the mailserver in your case there is a an Exchange server as you mentioned that.
Of course you can use Outlook as local service to send mail. What will happen is that the outlook program will be called and a popup is coming verifying you are a human and no spammer.
Outlook is communicating with a email-server.
The direct approach is connecting to the mail-server. A little painful for SAS is that they are too far behind with all evolvments in the market. When you are required to use a secured way of sending you could end up needing SAS 9.4.
SAS(R) 9.4 Companion for Windows, Third Edition what is new: encrypt e-mail by using SSL or TLS encryption protocols .
The SMTP send mail protocol does by design not having any security, the old way is assigning the machine (registered IP address) allowing sending the mail.
The option "message-send from" is another weakness of smpt as the sender can be faked not being part of the email-server.
Using the Html-3 version is something that comes in with Microsoft office see: White Paper: Message Formatting. For some reason MS is still using the old Html-version in their office products. This is probably changing.
When you need the html layout set it on the old version, the newer html tags are ignored. With SAS the default html setting is part of the SAS-registry of the running user. If you have many batch processes generating html needed the old version as default than that is a bypass to remember.
06-12-2015 09:18 AM
If you are trying to create outgoing email with the body of the email in HTML format, take a look at my blog post on this topic "Jedi SAS Tricks: Email from the Front – Part 2"
May the SAS be with you!