BookmarkSubscribeRSS Feed
anu_ha
Calcite | Level 5

Hi,

 

I am trying to use the below step to send the email and attach the file. But I get a warning as "WARNING: Email: 552 4.3.1 Message size exceeds fixed maximum message size". The same code works for smaller excel files. The file size is 5 MB, which is giving this warning, Is there change I need to make to this code?

 

 


%macro email_rpt1;

filename outmail email
to = ("abc@gmail.com")
subject = "Weekly Report"
attach=("C:\OUTPUT\Weekly Reports\ADMIN_REPORT.xlsx"
content_type="application/xlsx" LRECL = 9999)
from = "DSReporting";

data _null_;
file outmail;
put "Hi All,";
put "Please find the Weekly report attached .";
put ;
put ;
put;
run;

%mend email_rpt1;

%email_rpt1;

5 REPLIES 5
ChrisHemedinger
Community Manager

The warning/error is generated by your e-mail server, I think.  That's the SMTP e-mail server that would be listed in:

 

proc options group=email; run;

5MB is pretty big for an XLSX file.  XLSX is a compressed format (like ZIP), and it's quite a large attachment as part of a regular e-mail report.  Is there anything you can do to make the file smaller?  Your recipients might thank you for it.

 

Are you creating a native XLSX file (with PROC EXPORT DBMS=XLSX or ODS EXCEL)?  Or is the file really an XLS (not compressed) or is it ODS TAGSETS.EXCELXP output (verbose XML, which can be quite large)?

 

Chris

 

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
anu_ha
Calcite | Level 5

Hi Chris,

 

Thanks for your reply. There are few tabs on the report which is just data dump which makes the report of such size. If it was upto me I would have done a summary. But the user wants the data. 

 

About the excel file it is not created using SAS. It is a usual office excel file but had data imported from csv which is created using SAS. I know the ods creates quite large file, 

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Not to keep on the same point too much, but what you are talking about is data transfer.  Email really isn't a good option here.  In my company data transfer by unsecured email is not allowed, by poilicy.  I would be surprised if its not the same across the board.  I would advise internal delivery should be via secured network drive, portal, sharepoint etc. External would be across secured file transfer.

anu_ha
Calcite | Level 5

Hi,

 

My question is not about which method to use for data transfer. Thanks for your answers and time.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Can you send files of that size via your normal email client?  I would suspect that it is a limit put on by your IT group, for instance, I cannot send files larger than 10mb via my mail server due to this kind of restriction.

 

I would also suggest that email is not the best method of getting reports out to people.  Use a shared area/portal where reports are placed where people can go to view them, Sharepoint, Livelink, web portal etc. are all designed for this.

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 5 replies
  • 2185 views
  • 0 likes
  • 3 in conversation