Closed yizhl closed 10 years ago
Sure! Just let me see if I have understood it right - you want a new method where you can set personal name and email address separately? Something like (notice a space in personal name):
.to("JODD TECH ", "admin@jodd.org");
instead of existing:
.to("JODD TECH <admin@jodd.org>");
so you can eg have the extra space in personal name, like in this example?
/**
* @see #setTo(String...)
*/
public Email to(String to) {
setTo(to);
return this;
}
/**
* @see #setTo(String...)
*/
public Email to(String... tos) {
setTo(tos);
return this;
}
From the source (jodd.mail.Email.to(....)), we can not clear know that we can set persnal name like you said :
.to("JODD TECH <admin@jodd.org>");
From the doc (http://jodd.org/doc/email.html) and source all not describe email address format for pernal name( must have the extra space).
Add a method make email address separately,then you are clear,even have no doc:
.to("JODD TECH ", "admin@jodd.org");
Got it. The only reason for having thins in one string is because you can set multiple to addresses at once.
But you are right, this is not the first time someone is facing this problem :) I will make a change.
Thanks very much!
jodd-email should add a method to set email sender's nickname (personal name), not set it to null.
From jodd-email's source, in class jodd.mail.EmailUtil,it's look like as bellow: