4 Replies Latest reply: Dec 22, 2012 4:50 AM by jariola RSS

    how to write html  email using plsql

    972094
      I have to add html text in e-mail code so what i have to do...??

      follwing is code

      create or replace PROCEDURE TEST_EMAIL
      (mailhost IN VARCHAR2 DEFAULT 'smtp.gmail.com',
      sender VARCHAR2 DEFAULT 'mangesh.modiraj99@gmail.com',
      recipient IN VARCHAR2 DEFAULT 'gsgajanan128@gmail.com', -----code change , removed ')' add ','
      port_number IN NUMBER DEFAULT 465
      )
      IS
      mail_conn UTL_SMTP.CONNECTION; -----code change added mail_conn UTL_SMTP.CONNECTION;
      BEGIN
      mail_conn := UTL_SMTP.OPEN_CONNECTION(mailhost, 465);
      UTL_SMTP.HELO(mail_conn, mailhost);
      UTL_SMTP.MAIL(mail_conn, sender);
      UTL_SMTP.RCPT(mail_conn, recipient);
      UTL_SMTP.OPEN_DATA(mail_conn);
      UTL_SMTP.WRITE_DATA(mail_conn, 'This is a test message.' );
      UTL_SMTP.WRITE_DATA(mail_conn, 'This is line 2.');
      UTL_SMTP.CLOSE_DATA(mail_conn);
      UTL_SMTP.QUIT(mail_conn);
      END;


      please suggest me
      thanks advance

      Edited by: 969091 on Dec 22, 2012 1:54 AM