BookmarkSubscribeRSS Feed
KimLeBouton
Quartz | Level 8

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.

TIA,

Kim LeBouton

filename outbox email 'nul';

data _null_;

file outbox

      to=     (

"to_email_group"

               )

      cc=      (

"cc_email_group"

                )

      subject="A Spiffy Report for &Region"

      attach=(

"emailnote.htm"

"theattachedreportsfortheregion.zip"

               );

run;

9 REPLIES 9
SASJedi
SAS Super FREQ

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

Regards,

Mark

Check out my Jedi SAS Tricks for SAS Users
KimLeBouton
Quartz | Level 8

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.

Any suggestions?

Kim

WendyT
Pyrite | Level 9

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...

WendyT

 

DATA _NULL_ ;

     FILENAME WEEKLYREP EMAIL

       SUBJECT="Weekly report"

       FROM="wendyt@myplace.com"

       TO=("person1@myplace.com" "person2@myplace.com" "person3@myplace.com")

       CC= "wendyt@myplace.com"

       TYPE='text/html'

       ATTACH=("&QA_REPORTS\WEEKLY_REPORT1.HTML" "&QA_REPORTS\WEEKLY_REPORT2.HTML" );

RUN ;

6 proc options GROUP=EMAIL ; run ;

SAS (r) Proprietary Software Release 9.2 TS2M3

EMAILAUTHPROTOCOL=NONE

                                    Identifies the SMTP e-mail authentication protocol

NOEMAILFROM       Do not require FROM= for SMTP email

EMAILHOST=mail.myplace.com

                  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.

Doc_Duke
Rhodochrosite | Level 12

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).

Doc Muhlbaier

Duke

KimLeBouton
Quartz | Level 8

Finally back from vacation.

Thanks for the Outlook 2010 version information.

I will reach out to the exchange folks.

Kim

jakarman
Barite | Level 11

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. 

---->-- ja karman --<-----
SASJedi
SAS Super FREQ

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!
Mark

Check out my Jedi SAS Tricks for SAS Users
Ariaswift
Calcite | Level 5

Before purchasing any paid software for NFS to PST conversion, you should try an easy manual trick. The manual trick requires no paid software or any other cost. First, you need to save the NSF files' into such format which is supported by Outlook client. Luckily, IBM Lotus Notes provides you two file formats into which you can save your NSF files: Comma Separated Value and Structured Text. After that, you can import this new file to MS Outlook client by using its Import feature. or You can Try Datavare NSF to PST Converter

StellaQuinton
Calcite | Level 5

With the help of this Softaken NSF to PST Converter software allows users to convert unlimited Lotus Notes.NSF files. It successfully exports Lotus Notes to Ms. Outlook and converts NSF to pst with text, attachments, Folders, and subfolders, Message properties like to, from, cc, bcc, sent/receive dates and times, Calendar items, Task items, Encrypted email, and attachments.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 9 replies
  • 3269 views
  • 1 like
  • 7 in conversation