-
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
-
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|