所以你想通过 sas 发送电子邮件通知?问题是两个折叠的。首先,您需要确保您的 SMTP 服务器在 SAS 中正确配置。其次,您必须制作所需的邮件软件。
请按照http://support.sas.com/kb/19/767.html中的指南进行操作
现在您想要(显然)是解析/选择电子邮件。我将假设您仅从数据集中选择它们。
Proc sql;
select distinct(emails) into: resplist separated by ' ' from mail_set where emails like '%@%';
/*Here I'm selecting only those that have @ mark in the cells.
You can add parser as you need. (question is a bit oddly worded.*/
quit;
或者,您可以对地址进行硬编码。 (我建议您尝试第一次,这样您就知道您的发送代码有效。
%let respList="Frist.last@email.com" "Second.Recipiant@email.com";
FILENAME Mailbox EMAIL &respList.
Subject="Email delivery for you";
DATA _NULL_;
FILE Mailbox;
PUT "Good day,";
put ;
PUT "Remain calm. This is a test.";
PUT ;
run;
您也可以添加 sas 数据集信息,但请记住,通过电子邮件发送垃圾邮件通常是个坏主意。