Please write an exception for wrong email address while sending. If the wrong email address is found its not sending the mails to the remaining users. Below is the my code. Hi, My mails data set looks as follows 1 abc123@some.com 2 def@some.com 3 ghi@some.com 4 jkl@some.com 5 abc123@some.com 6 def@some.com 7 def@some.com consider abc123@some.com is a wrong email As of now my code looks as follows;;; STEP=1: Sorting the data set. -------------------------------------------------------------------------------------------------------------------- PROC SORT DATA=mails; BY mail_id; RUN; ----------------------------------------------------------------------------------------------------------------------------------- STEP=2 : Sending mails for every three hundred users after holding the triggering mails process for 2 mnts.. --------------------------------------------------------------------------------------------------------------------------------------- %macro send_email; filename hm_mail email lrecl=32000 type='text/html'; data _null_; set mails END=EOF; by mail_id; file hm_mail; retain numofusers 0; if first.mail_id then do; numofusers=numofusers+1; If mod(numofusers,300) = 0 then Timer=Sleep(120,1); put '!EM_TO!' mail_id; put '!EM_SUBJECT!' 'Test Plans have been created.'; put 'The following test plans have been created with you as a tester.'; put '<br>'; end; id_link = '<a href="' ||left(strip(id)) || '">' || left(strip(id)) || '</a>' ; put '<br>'; put id_link; put '<br>'; if last.mail_id then do; put '<br>'; put 'This is a system-generated message. Do not reply to this e-mail.'; put '!EM_SEND!'; put '!EM_NEWMSG!'; end; if EOF then put '!EM_ABORT!'; run; %mend send_email; %send_email; Here I am getting an error message as below when %send_email is excecuted ***********Below is the error message in email logs****************************************************** WARNING: Email: 550 5.1.1 <abc123@some.com Recipient address rejected: User unknown WARNING: Bad email address: abc123@some.com ERROR: No email addresses specified. FATAL: Unrecoverable I/O error detected in the execution of the DATA step program. Aborted during the EXECUTION phase. ************************************************************************************************************** After this its not sending emails to the remaining users.. Could you please suggest me how to add an exception to handle this error at the time of exection.. Many thanks in advance..
... View more