BookmarkSubscribeRSS Feed
willi_m
Calcite | Level 5

Hi,

I've create a web application in chaining SAS Stored Process. In this application, in the last screen a mail is sending to a receiver with a report in the body of mail and no attachment.

But if we check in the mail, there is two attachments: 

a text file named ATT00001.txt and an htm file named ATT00002.htm. The two files contains the same message:

 

<WARNING> this message is sent automatically and the identity of the sender can not be technically verified </WARNING>

 

program used is like this:

FILENAME outmail EMAIL
  SUBJECT= "subject"
  FROM= "&mail_report_to."
  TO="&list_receiver_to."
  CC="&list_receiver_cc."
  CT="text/html lrecl=32000";

ods msoffice2k file=outmail style=HTMLBlue metatext='name="viewport" 
content="width="device-width"' options(pagebreak="no");    --- Code to generate Report --- ods msoffice2k close;

If someone has the solution to disable this attachment.

 

 

 

 

1 REPLY 1
rajdeep
Pyrite | Level 9

Hi William,

 

Exactly I don't get it what you are trying to do. I mean you wanted to disable the attachment or you want only one format of attachments should traverse over email.

 

Anyways here are some explanations are there regarding Content Type and Attachments in the Filename statement. I hope the below information will help you.

 

 

xt' | ATTACH= ('filename.ext' attachment-options)

specifies the physical name of the file or files to be attached to the message and any options to modify attachment specifications. The physical name is the name that is recognized by the operating environment. Enclose the physical name in quotation marks. To attach more than one file, enclose the group of files in parentheses, enclose each file in quotation marks, and separate each with a space. Here are examples:

attach="/u/userid/opinion.txt"
attach=('C:\Status\June2001.txt' 'C:\Status\July2001.txt')
attach="user.misc.pds(member)"
The attachment-options include these values:

CONTENT_TYPE='content/type'

specifies the content type for the attached file. You must enclose the value in quotation marks. If you do not specify a content type, SAS tries to determine the correct content type based on the filename. For example, if you do not specify a content type, a filename of home.html is sent with a content type of text/html.

Alias CT= and TYPE=
Default If SAS cannot determine a content type based on the filename and extension, the default value is text/plain.

 

Thanks and Cheers.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1172 views
  • 0 likes
  • 2 in conversation