You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Norman Maurer <no...@apache.org> on 2010/07/15 18:18:32 UTC

Re: How to send mail as "On Behalf Of"?

How you "inject" the email to james ? Via SMTP ?

Bye,
Norman

2010/7/15 prakash <pr...@collab.net>:
> Hi,
>
> I'm using james.2.2.0 version. I'm try to send mail from james like
> "user1@mydomain.com" on behalf of "user2@mydomain.com".
>
> I tried below ways, but none of them seems to work. I'm in missing
> anything?.
>
> 1) InternetAddress sender = new InternetAddress();
>  sender.setAddress("user1@mydomain.com");
>  message.setSender(sender);
>
> 2) message.setHeader("FROM:","user1@mydomain.com");
>
> 3) message.setHeader("X-Sender","user1@mydomain.com");
>
> 4)message.setHeader("MAIL FROM:","user1@mydomain.com");
>
> Any suggestions?
>
> Thanks,
> Prakash.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


RE: How to send mail as "On Behalf Of"?

Posted by Prakash Chinnakannan <pr...@collab.net>.
Thanks for reply Norman, we do Transport.send(message, addresses); where message is MimeMessage and address is InternetAddress[].

How you "inject" the email to james ? Via SMTP ?

Bye,
Norman

2010/7/15 prakash <pr...@collab.net>:
> Hi,
>
> I'm using james.2.2.0 version. I'm try to send mail from james like
> "user1@mydomain.com" on behalf of "user2@mydomain.com".
>
> I tried below ways, but none of them seems to work. I'm in missing
> anything?.
>
> 1) InternetAddress sender = new InternetAddress();
>  sender.setAddress("user1@mydomain.com");
>  message.setSender(sender);
>
> 2) message.setHeader("FROM:","user1@mydomain.com");
>
> 3) message.setHeader("X-Sender","user1@mydomain.com");
>
> 4)message.setHeader("MAIL FROM:","user1@mydomain.com");
>
> Any suggestions?
>
> Thanks,
> Prakash.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org