Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return-Path: is not available in Pay-mailer #88

Open
abhishekmishra17 opened this issue Jan 28, 2016 · 3 comments
Open

Return-Path: is not available in Pay-mailer #88

abhishekmishra17 opened this issue Jan 28, 2016 · 3 comments

Comments

@abhishekmishra17
Copy link

Return-Path: is used to handle bounce email.I have tried with bounceAddress variable avaiable in Email class but it's not working

@ggrossetie
Copy link
Member

Return-Path: is used to handle bounce emailI have tried with bounceAddress variable avaiable in Email class but it's not working

Hello, could you please share an example with your code ? Thanks.

@abhishekmishra17
Copy link
Author

Email email = new Email();
email.setSubject(mailData.getEmailSubject());
email.setFrom(getEmailIdFrom());
email.setTo(to);
email.setBounceAddress(bounceEmail);
email.setBcc(bcc);
email.setCc(cc);
MailerPlugin.send(email);

@ggrossetie
Copy link
Member

Play mailer uses Apache commons email to configure and send email.
Bounce address is used to configure the property MAIL_SMTP_FROM on the session: https://github.com/apache/commons-email/blob/EMAIL_1_3_3/src/main/java/org/apache/commons/mail/Email.java#L676.

AFAIK this is the correct way to handle bounce address in Java: http://stackoverflow.com/questions/1782659/how-to-set-the-return-path-to-an-email-address-other-than-sender-address-using-j

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants