Forum Stats

  • 3,838,262 Users
  • 2,262,349 Discussions
  • 7,900,568 Comments

Discussions

problem sending mail using UTL_SMTP (STARTTLS ?)

jort
jort Member Posts: 43
edited Oct 17, 2012 9:00AM in SQL & PL/SQL
I am getting the following error using the UTL_SMTP package.

"SMTP Permanent error: 530 5.7.0 Must issue a STARTTLS command first"

Can anyone tell me how to work around this? I'm using AUTH LOGIN to pass in a username and password.

Thanks,
Josh

Comments

  • MCastagno
    MCastagno Member Posts: 154
    Did You encode USER and PASSWORD to connect?
    After which command did You rerceive the error?
  • Rpang-Oracle
    Rpang-Oracle Member Posts: 158
    Sorry. UTL_SMTP does not support SSL currently (which seems to be what your SMTP server requires according to the STARTTLS message). This should be an enhancement request.

    If you need to send email from the database that requires SSL, you may consider using Java stored procedure and JavaMail API instead.

    Thanks.
  • user612155
    user612155 Member Posts: 1 Blue Ribbon
    Dear experts,

    Can you please answer my questions? Thanks In Advance.

    1. Is UTL_SMTP able to support STARTTLS after more than 1 year has passed? If it is, how can we issue the command "STARTTLS" to the database?

    2. How do Oracle Databases support STARTTLS in a general way, apart from Oracle Virtual Directory and Oracle Mail?

    Best Regards,
    Jing Huang
  • dask99
    dask99 Member Posts: 335
    edited Oct 29, 2009 8:23AM
    rpang wrote:
    Sorry. UTL_SMTP does not support SSL currently (which seems to be what your SMTP server requires according to the STARTTLS message). This should be an enhancement request.
    Hi,

    Anyone knows if this functionality is actually available on 10.2.0.4 version ??? or not yet ???

    Thanks
  • 604949
    604949 Member Posts: 2
    edited Sep 16, 2010 8:07AM
    It's only supported in Oracle Database 11g Release 2 (11.2.0.2)

    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e16760/u_smtp.htm#CHDHHBJD

    Edited by: Filipe Silva on Sep 16, 2010 1:06 PM
  • User_Sep
    User_Sep Member Posts: 249
    am following up the link
    BEGIN
      EXECUTE IMMEDIATE 'ALTER SESSION SET smtp_out_server = ''127.0.0.1''';
      UTL_MAIL.send(sender => '[email protected]',
                recipients => '[email protected]',
                   subject => 'Test Mail',
                   message => 'Hello World',
                 mime_type => 'text; charset=us-ascii');
    END;
    /
    but it result in
    ERROR at line 1:
    ORA-29279: SMTP permanent error: 530 5.7.0 Must issue a STARTTLS command first.
    bj7sm12523388pab.24
    ORA-06512: at "SYS.UTL_SMTP", line 21
    ORA-06512: at "SYS.UTL_SMTP", line 99
    ORA-06512: at "SYS.UTL_SMTP", line 222
    ORA-06512: at "SYS.UTL_MAIL", line 407
    ORA-06512: at "SYS.UTL_MAIL", line 594
    ORA-06512: at line 3
    so i had question by utl_mail can able to send email or not?
    following scenario.
    from my1companydomainmail.com to my2comapnydomainmail.com
    from gmail to mycompany domain.com
  • ranit B
    ranit B Member Posts: 3,268 Silver Trophy
    Check if SMTP_OUT_SERVER is set properly.

    Refer -- http://docs.oracle.com/cd/B12037_01/server.101/b10755/initparams198.htm
  • User_Sep
    User_Sep Member Posts: 249
    SMTP_OUT_SERVER : am using smtp.gmail.com
This discussion has been closed.