title: Configuring UTL_MAIL Package Prerequisites
body: <p>I was trying to configure my system to send mail using UTL_MAIL package but no luck .. I read that I need to configure ACL first.  hence I did. But even doing so it's not working still.</p>
  
  <pre><code>SELECT * FROM dba_network_acls;
  
  begin
    dbms_network_acl_admin.create_acl (
      acl         =&gt; 'utl_http.xml',
      description =&gt; 'HTTP Access',
      principal   =&gt; 'HR',
      is_grant    =&gt; TRUE,
      privilege   =&gt; 'connect',
      start_date  =&gt; null,
      end_date    =&gt; null
    );
    dbms_network_acl_admin.add_privilege (
      acl        =&gt; 'utl_http.xml',
      principal  =&gt; 'HR',
      is_grant   =&gt; TRUE,
      privilege  =&gt; 'resolve',
      start_date =&gt; null,
      end_date   =&gt; null
    );
    dbms_network_acl_admin.assign_acl (
      acl        =&gt; 'utl_http.xml',
      host       =&gt; 'smtp.gmail.com',
      lower_port =&gt; 25,  --- Gmail SMTP server.
      upper_port =&gt; 25
    );
    commit;
  end;
  /
  </code></pre>
  
  <p>I am getting error  </p>
  
  <p><strong>ORA-29279: SMTP permanent error: 530 5.7.0 Must issue a STARTTLS command first. ei4sm3659171pbb.42 - gsmtp
  ORA-06512: at "SYS.UTL_MAIL", line 654
  ORA-06512: at "SYS.UTL_MAIL", line 671
  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.</strong> </p>
  
  <p>I have already executed the following commands</p>
  
  <p>CONN sys/password AS SYSDBA</p>
  
  <p>@$ORACLE_HOME/rdbms/admin/utlmail.sql</p>
  
  <p>@$ORACLE_HOME/rdbms/admin/prvtmail.plb</p>
  
  <p>Please help !</p>