UTL_SMTP: Return-Path header issue
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