11-24-2015 07:21 AM
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?
filename outmail email
to = ("firstname.lastname@example.org")
subject = "Weekly Report"
content_type="application/xlsx" LRECL = 9999)
from = "DSReporting";
put "Hi All,";
put "Please find the Weekly report attached .";
11-24-2015 07:51 AM
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)?
11-24-2015 09:11 AM
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,
11-24-2015 10:12 AM
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.
11-24-2015 07:55 AM
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.