Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

UTL_SMTP: Return-Path header issue

dariusrusSep 9 2008 — edited Sep 9 2008
Hi,

I'm setting the "Return-Path" header when sending an email to have a different value as the "From" header (see bellow), however the "Return-Path" remains set as the "From" header is set. Any suggestions how to set a different "Return-Path" header that the "From" header?

utl_smtp.write_data(conn, 'Return-Path: ');
utl_smtp.write_raw_data(conn, utl_raw.cast_to_raw('<'||return_path||'>'));
utl_smtp.write_data(conn, utl_tcp.CRLF);

utl_smtp.write_data(conn, 'From: ');
utl_smtp.write_raw_data(conn, utl_raw.cast_to_raw(fromX));
utl_smtp.write_data(conn, utl_tcp.CRLF);


In java to get this to work I need to set the "mail.smtp.from" system property to what I want in "Return-Path" and then set a different "From" header, is there a similar approch when using UTL_SMTP?

Properties prop = new Properties();
prop.put("mail.smtp.from", "<bouncehandler@domain.com>");
((JavaMailSenderImpl) mailSender).setJavaMailProperties(prop);


Thank you,
Darius
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 7 2008
Added on Sep 9 2008
1 comment
622 views