I post again with the same story, cause i can't get it, sorry!
I sometimes send emails to individual people, not using my mailinglist (=James Mailet), just using JavaMail API from my app, relaying with James. Sender is [EMAIL PROTECTED] I want the people to see this :

From: foo <[EMAIL PROTECTED]>

I first tried this :
msg.setFrom(new InternetAddress("[EMAIL PROTECTED]"));
Address[] aliasFrom = {new InternetAddress("foo")};
msg.addFrom(aliasFrom);

I get what i want with most of mail clients but yahoo says :
INFO James.Mailet: RemoteDelivery: Permanent exception delivering mail (Mail1147348831328-277-!737546-to-yahoo.fr: javax.mail.MessagingException: 501 Syntax error in parameters or arguments

I guess i did something wrong there, i guess because foo is not a email address. Should i really need a mailet to do that?

Thanks
Phil

Stefano Bagnara wrote:
philguillard wrote:

Thanks a lot for your quick response.

Maybe offtopic a little bit : is it also possible to do that with JavaMail API (something like addHeader("From","foo")) ?

Phil


From:
http://java.sun.com/developer/onlineTraining/JavaMail/contents.html
----
Address address = new InternetAddress("[EMAIL PROTECTED]", "George Bush");
message.setFrom(address);
----

Stefano


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to