5 Replies Latest reply: Feb 11, 2013 7:48 AM by Ahamed Rafeeque RSS

    problem while sending mail

    967903
      hi experts,
      i am trying to send mail through orcale form.
      for this i used following code but i found that error.

      unable to send mail ora-29279:smtp permanent error:550.7.1

      the code are

      PROCEDURE MAIL_M1 IS

      begin
      DECLARE
      v_From VARCHAR2(80) := 'ankur.erp@iljin.co.in';
      v_Recipient VARCHAR2(80) := 'ravi.erp@iljin.co.in';
      v_Recipient1 VARCHAR2(80) := 'dhirender.erp@iljin.co.in';
      v_Subject VARCHAR2(80) := 'Unit Price Approv';
      v_Mail_Host VARCHAR2(30) := '192.168.1.221';
      v_Mail_Conn utl_smtp.Connection;
      crlf VARCHAR2(2) := chr(13)||chr(10);
      BEGIN
      v_Mail_Conn := utl_smtp.Open_Connection(v_mail_host,25);
      utl_smtp.Helo(v_Mail_Conn, v_Mail_Host);
      utl_smtp.Mail(v_Mail_Conn, v_From);
      utl_smtp.Rcpt(v_Mail_Conn, v_Recipient);
      utl_smtp.Rcpt(v_Mail_Conn, v_Recipient1);
      utl_smtp.Data(v_Mail_Conn,
      'Date: ' || to_char(sysdate, 'Dy, DD Mon YYYY hh24:mi:ss') || crlf ||
      'From: ' || v_From || crlf ||
      'Subject: '|| v_Subject || crlf ||
      'To: ' || v_Recipient || crlf ||
      crlf ||
      'Dear Sir,'||crlf ||
      'You have Some Items for Unit Price Approval'|| crlf
      --||'more message text'|| crlf
      );
      utl_smtp.Quit(v_mail_conn);
      EXCEPTION
      WHEN utl_smtp.Transient_Error OR utl_smtp.Permanent_Error then
      mess('Unable to send mail: '||sqlerrm);
      --raise form_trigger_failure;
      end;
      END;

      Thanks
      Ravi