In the immediate case I need to change this -   
          

if (empty(mimeMessage.getFrom())) {

     //default the address to the endpoint destination

     String from = endpoint.getConfiguration().getFrom();

     mimeMessage.setFrom(new InternetAddress(from));

}


to 


if (empty(mimeMessage.getFrom())) {

     //default the address to the endpoint destination

     String from = endpoint.getConfiguration().getFrom();

     String fromName = endpoint.getConfiguration().getFromName();

     if(fromName != null)

                mimeMessage.setFrom(new InternetAddress(from, fromName)); 

     else

                mimeMessage.setFrom(new InternetAddress(from));

}





rohitbrai wrote:
> 
> I have a requirement, which should I think should be standard, that when I
> send the mail I should be able to set the sender name also along with the
> sender email.
> 
> Is there any way to do this??? Can I extend the MailBinding class, such
> that Camel reads my class to create binding for the the mail component?
> 
> I am asking because I may need to do many customizations to the mail and
> headers and properties before sending the mail in my application.
> 
> Regards,
> Rohit
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Can-Modify-Mail-SMTP-component-to-accept-Sender-Name-along-with-Sender-Email-tp23651192p23651866.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to