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.
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.
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)"
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.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.