6 Replies Latest reply on Feb 9, 2010 10:02 PM by alexlizn

    UTL_MAIL does not take comma separated email addresses

    alexlizn
      Hi, there,

      I tried email multiple email addresses through UTL_MAIL, but ran into the following error:


      begin
      UTL_MAIL.SEND
      ( sender => 'abc@abc.com'
      , recipients => 'abc@abc.org, efg@abc.com'
      , cc => null
      , subject => 'test'
      , message => 'this is a test');
      end;



      Error starting at line 2 in command:
      begin
      UTL_MAIL.SEND
      ( sender => 'abc@abc.com'
      , recipients => 'abc@abc.org, efg@abc.com'
      , cc => null
      , subject => 'test'
      , message => 'this is a test');
      end;

      Error report:
      ORA-29279: SMTP permanent error: 550 5.7.1 Unable to relay
      ORA-06512: at "SYS.UTL_SMTP", line 20
      ORA-06512: at "SYS.UTL_SMTP", line 98
      ORA-06512: at "SYS.UTL_SMTP", line 240
      ORA-06512: at "SYS.UTL_MAIL", line 414
      ORA-06512: at "SYS.UTL_MAIL", line 608
      ORA-06512: at line 2
      29279. 00000 - "SMTP permanent error: %s"
      *Cause:    A SMTP permanent error occurred.
      *Action:   Correct the error and retry the SMTP operation.



      However, I checked the Oracle UTL_MAIL reference at:

      http://download.oracle.com/docs/cd/B12037_01/appdev.101/b10802/u_mail.htm#996885

      When it comes to 'recipients' parameter, it reads:

      The email addresses of the recipient(s), separated by commas.


      As you can see in my source code, I did use comma to separate the two email addresses. So what's wrong?

      The configuration of UTL_MAIL has been done. In fact, I can use UTL_MAIL to send email to any single email address.

      Thanks!
      Alex