Sending Mail to Printer by using utl_smtp.rcpt.
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Sending Mail to Printer by using utl_smtp.rcpt.

Hybrid View

  1. #1
    Join Date
    Apr 2013
    Posts
    1

    Sending Mail to Printer by using utl_smtp.rcpt.

    BEGIN
    mail_conn := utl_smtp.open_connection(mailhost, 25);

    mesg := 'Date: ' ||
    TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss') || crlf ||
    'From: <'|| pSender ||'>' || crlf ||
    'Subject: '|| pSubject || crlf ||
    'To: '||pRecipient || crlf || '' || crlf || pMessage;

    utl_smtp.helo(mail_conn, mailhost);
    utl_smtp.mail(mail_conn, pSender);
    utl_smtp.rcpt(mail_conn, pRecipient);
    utl_smtp.data(mail_conn, mesg);
    utl_smtp.quit(mail_conn);
    EXCEPTION
    WHEN INVALID_OPERATION THEN
    NULL;
    WHEN TRANSIENT_ERROR THEN
    NULL;
    WHEN PERMANENT_ERROR THEN
    NULL;
    WHEN OTHERS THEN
    NULL;
    END send_mail

    Hi Team,

    I am using above script to send mail is it possible to send this to printer.

    Basically this will email to outlook with HTML Tables but we also need to send this output to printer, any idea ?

    Regards,
    RK

  2. #2
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    3,968
    Figure out what port your network attached printer uses and use the UTL_TCP package to send the output to the right port on the printer. You can also try UTL_SMTP.
    this space intentionally left blank

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width