#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    FLorida
    Posts
    45
    Rep Power
    16

    send email through oracle


    Hi All,

    I am trying to run this pl/sql and I am getting an error and that I have no clue what to do next. I am trying to send email using pl/sql.
    Do I need to install or configure other stuff to get this working?

    I would really appreciate the suggestions!!

    I put email in everyspot as a test.

    DECLARE
    v_connection UTL_SMTP.CONNECTION;
    BEGIN
    v_connection := UTL_SMTP.OPEN_CONNECTION('email',25);
    UTL_SMTP.HELO(v_connection, 'email');
    UTL_SMTP.MAIL(v_connection, 'email');
    UTL_SMTP.RCPT(v_connection, 'email');
    UTL_SMTP.DATA(v_connection, 'email');
    UTL_SMTP.QUIT(v_connection);
    END;

    After running thsi pl/sql block in sqlplus i am getting this error.


    ERROR at line 1:
    ORA-29278: SMTP transient error: 421 Service not available
    ORA-06512: at "SYS.UTL_SMTP", line 17
    ORA-06512: at "SYS.UTL_SMTP", line 96
    ORA-06512: at "SYS.UTL_SMTP", line 138
    ORA-06512: at line 4
    Last edited by hurricane850; November 24th, 2003 at 03:17 PM.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2005
    Posts
    1
    Rep Power
    0
    hi
    try giving your server ip address in the following line
    v_connection := UTL_SMTP.OPEN_CONNECTION('email',25);

    eg:
    v_connection := UTL_SMTP.OPEN_CONNECTIO('x.x.x.x',25);
    it works
    reg
    krish




    Originally Posted by hurricane850
    Hi All,

    I am trying to run this pl/sql and I am getting an error and that I have no clue what to do next. I am trying to send email using pl/sql.
    Do I need to install or configure other stuff to get this working?

    I would really appreciate the suggestions!!

    I put email in everyspot as a test.

    DECLARE
    v_connection UTL_SMTP.CONNECTION;
    BEGIN
    v_connection := UTL_SMTP.OPEN_CONNECTION('email',25);
    UTL_SMTP.HELO(v_connection, 'email');
    UTL_SMTP.MAIL(v_connection, 'email');
    UTL_SMTP.RCPT(v_connection, 'email');
    UTL_SMTP.DATA(v_connection, 'email');
    UTL_SMTP.QUIT(v_connection);
    END;

    After running thsi pl/sql block in sqlplus i am getting this error.


    ERROR at line 1:
    ORA-29278: SMTP transient error: 421 Service not available
    ORA-06512: at "SYS.UTL_SMTP", line 17
    ORA-06512: at "SYS.UTL_SMTP", line 96
    ORA-06512: at "SYS.UTL_SMTP", line 138
    ORA-06512: at line 4

IMN logo majestic logo threadwatch logo seochat tools logo