setting header Return-Path

Hi all,

I am unable to set the header Return-Path. It is always the From address. This is the code I used.

Message m = new MimeMessage(sn);

m.setHeader("Return-Path","<antonypaul24@xxx.com>");

Is it becuase that it is set by the API or the server.

rgds

Antony Paul

[313 byte] By [Antony.Paula] at [2007-10-2 5:28:09]
# 1

i use this and it's works for me :

msg.setHeader("Return-Path", "<" + content.getReadReceipt() + ">");

msg.setHeader("Disposition-Notification-To", "\"" + content.getReadReceipt() + "\" " + "<" + content.getReadReceipt() + ">");

with content.getReadReceipt() : the return email

amelina at 2007-7-16 1:29:48 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
Which version and implementation of JavaMail you are using ?. Also what is the mail server ?. I tried your code and is not working for me. I am using JavaMail 1.3 from Sun and SendMail 8.12.9rgdsAnto Paul
Antony.Paula at 2007-7-16 1:29:48 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...