From e5de9d1b2debc69a6cd97eec759be65eb8728aa0 Mon Sep 17 00:00:00 2001 From: Elrhino Date: Thu, 28 May 2015 15:37:08 -0400 Subject: [PATCH 1/4] Added replyTo field --- .../com/arcbees/appengine/mail/Email.java | 2 + .../arcbees/appengine/mail/EmailBuilder.java | 27 ++++-- .../arcbees/appengine/mail/SendEmailTask.java | 4 + .../appengine/mail/MailBuilderFromTest.java | 86 +++++++++++++------ .../appengine/mail/SendEmailTaskTest.java | 1 + 5 files changed, 87 insertions(+), 33 deletions(-) diff --git a/appengine-mail/src/main/java/com/arcbees/appengine/mail/Email.java b/appengine-mail/src/main/java/com/arcbees/appengine/mail/Email.java index ae98d24..f3d95d0 100644 --- a/appengine-mail/src/main/java/com/arcbees/appengine/mail/Email.java +++ b/appengine-mail/src/main/java/com/arcbees/appengine/mail/Email.java @@ -28,4 +28,6 @@ public interface Email extends Serializable { String getSubject(); String getBody(); + + String getReplyToAddress(); } diff --git a/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailBuilder.java b/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailBuilder.java index d0938ef..d046e3f 100644 --- a/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailBuilder.java +++ b/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailBuilder.java @@ -1,12 +1,12 @@ /** * Copyright 2013 ArcBees Inc. - * + *

* Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - * + *

* http://www.apache.org/licenses/LICENSE-2.0 - * + *

* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -34,6 +34,8 @@ public MailBuilderFromAddress fromAddress(String from) { public static class MailBuilderFromAddress { private final String fromAddress; private final MailBuilderTo mailBuilderTo; + + private String replyToAddress; private String subject; private String body; private String fromPersonal; @@ -44,6 +46,7 @@ private MailBuilderFromAddress(String fromAddress, this.subject = ""; this.fromAddress = fromAddress; this.fromPersonal = DEFAULT_PERSONAL; + this.replyToAddress = ""; this.mailBuilderTo = mailBuilderTo; } @@ -65,8 +68,14 @@ public MailBuilderFromAddress fromPersonal(String fromPersonal) { return this; } + public MailBuilderFromAddress replyToAddress(String replyToAddress) { + this.replyToAddress = replyToAddress; + + return this; + } + public Email build() { - return new EmailImpl(mailBuilderTo.to, fromAddress, fromPersonal, subject, body); + return new EmailImpl(mailBuilderTo.to, fromAddress, fromPersonal, subject, body, replyToAddress); } } @@ -76,13 +85,16 @@ private static class EmailImpl implements Email { private final String fromAddress; private final String fromPersonal; private final String body; + private final String replyToAddress; - private EmailImpl(String to, String fromAddress, String fromPersonal, String subject, String body) { + private EmailImpl(String to, String fromAddress, String fromPersonal, String subject, String body, + String replyToAddress) { this.to = to; this.fromAddress = fromAddress; this.subject = subject; this.fromPersonal = fromPersonal; this.body = body; + this.replyToAddress = replyToAddress; } @Override @@ -109,6 +121,11 @@ public String getSubject() { public String getBody() { return body; } + + @Override + public String getReplyToAddress() { + return replyToAddress; + } } public static MailBuilderTo to(String to) { diff --git a/appengine-mail/src/main/java/com/arcbees/appengine/mail/SendEmailTask.java b/appengine-mail/src/main/java/com/arcbees/appengine/mail/SendEmailTask.java index 35f18bb..be4e60a 100644 --- a/appengine-mail/src/main/java/com/arcbees/appengine/mail/SendEmailTask.java +++ b/appengine-mail/src/main/java/com/arcbees/appengine/mail/SendEmailTask.java @@ -21,6 +21,7 @@ import java.util.logging.Level; import java.util.logging.Logger; +import javax.mail.Address; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.Session; @@ -57,6 +58,9 @@ public void run() { message.addRecipient(Message.RecipientType.TO, new InternetAddress(email.getTo())); message.setSubject(email.getSubject()); message.setContent(email.getBody(), CONTENT_TYPE); + message.setReplyTo(new Address[] { + new InternetAddress(email.getReplyToAddress()) + }); transport.send(message); } catch (MessagingException e) { diff --git a/appengine-mail/src/test/java/com/arcbees/appengine/mail/MailBuilderFromTest.java b/appengine-mail/src/test/java/com/arcbees/appengine/mail/MailBuilderFromTest.java index 810ce18..51894ba 100644 --- a/appengine-mail/src/test/java/com/arcbees/appengine/mail/MailBuilderFromTest.java +++ b/appengine-mail/src/test/java/com/arcbees/appengine/mail/MailBuilderFromTest.java @@ -1,12 +1,12 @@ /** * Copyright 2013 ArcBees Inc. - * + *

* Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - * + *

* http://www.apache.org/licenses/LICENSE-2.0 - * + *

* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -21,71 +21,101 @@ import static org.junit.Assert.assertEquals; public class MailBuilderFromTest { + + public static final String TO = "to"; + public static final String FROM_ADDRESS = "fromAddress"; + public static final String FROM_PERSONAL = "fromPersonal"; + public static final String BODY = "body"; + public static final String SUBJECT = "subject"; + public static final String REPLY_TO_ADDRESS = "replyToAddress"; + @Test public void build_allFieldsFilled_emailIsWellBuilt() { //given - EmailBuilder.MailBuilderFromAddress mailBuilderFromAddress = EmailBuilder.to("to").fromAddress("fromAddress").fromPersonal - ("fromPersonal").body("body").subject("subject"); + EmailBuilder.MailBuilderFromAddress mailBuilderFromAddress = EmailBuilder.to(TO).fromAddress(FROM_ADDRESS).fromPersonal + (FROM_PERSONAL).body(BODY).subject(SUBJECT).replyToAddress(REPLY_TO_ADDRESS); //when Email email = mailBuilderFromAddress.build(); //then - assertEquals("to", email.getTo()); - assertEquals("fromAddress", email.getFromAddress()); - assertEquals("fromPersonal", email.getFromPersonal()); - assertEquals("body", email.getBody()); - assertEquals("subject", email.getSubject()); + assertEquals(TO, email.getTo()); + assertEquals(FROM_ADDRESS, email.getFromAddress()); + assertEquals(FROM_PERSONAL, email.getFromPersonal()); + assertEquals(BODY, email.getBody()); + assertEquals(SUBJECT, email.getSubject()); + assertEquals(REPLY_TO_ADDRESS, email.getReplyToAddress()); } @Test public void build_missingBody_emailIsWellBuilt() { //given - EmailBuilder.MailBuilderFromAddress mailBuilderFromAddress = EmailBuilder.to("to").fromAddress("fromAddress").fromPersonal - ("fromPersonal").subject("subject"); + EmailBuilder.MailBuilderFromAddress mailBuilderFromAddress = EmailBuilder.to(TO).fromAddress(FROM_ADDRESS).fromPersonal + (FROM_PERSONAL).subject(SUBJECT).replyToAddress(REPLY_TO_ADDRESS); //when Email email = mailBuilderFromAddress.build(); //then - assertEquals("to", email.getTo()); - assertEquals("fromAddress", email.getFromAddress()); - assertEquals("fromPersonal", email.getFromPersonal()); + assertEquals(TO, email.getTo()); + assertEquals(FROM_ADDRESS, email.getFromAddress()); + assertEquals(FROM_PERSONAL, email.getFromPersonal()); assertEquals("", email.getBody()); - assertEquals("subject", email.getSubject()); + assertEquals(SUBJECT, email.getSubject()); + assertEquals(REPLY_TO_ADDRESS, email.getReplyToAddress()); } @Test public void build_missingSubject_emailIsWellBuilt() { //given - EmailBuilder.MailBuilderFromAddress mailBuilderFromAddress = EmailBuilder.to("to").fromAddress("fromAddress").fromPersonal - ("fromPersonal").body("body"); + EmailBuilder.MailBuilderFromAddress mailBuilderFromAddress = EmailBuilder.to(TO).fromAddress(FROM_ADDRESS).fromPersonal + (FROM_PERSONAL).body(BODY).replyToAddress(REPLY_TO_ADDRESS); //when Email email = mailBuilderFromAddress.build(); //then - assertEquals("to", email.getTo()); - assertEquals("fromAddress", email.getFromAddress()); - assertEquals("fromPersonal", email.getFromPersonal()); - assertEquals("body", email.getBody()); + assertEquals(TO, email.getTo()); + assertEquals(FROM_ADDRESS, email.getFromAddress()); + assertEquals(FROM_PERSONAL, email.getFromPersonal()); + assertEquals(BODY, email.getBody()); assertEquals("", email.getSubject()); + assertEquals(REPLY_TO_ADDRESS, email.getReplyToAddress()); } @Test public void build_missingPersonal_emailIsWellBuilt() { //given - EmailBuilder.MailBuilderFromAddress mailBuilderFromAddress = EmailBuilder.to("to").fromAddress("fromAddress").body - ("body").subject("subject"); + EmailBuilder.MailBuilderFromAddress mailBuilderFromAddress = EmailBuilder.to(TO).fromAddress(FROM_ADDRESS).body + (BODY).subject(SUBJECT).replyToAddress(REPLY_TO_ADDRESS); //when Email email = mailBuilderFromAddress.build(); //then - assertEquals("to", email.getTo()); - assertEquals("fromAddress", email.getFromAddress()); + assertEquals(TO, email.getTo()); + assertEquals(FROM_ADDRESS, email.getFromAddress()); assertEquals(EmailBuilder.DEFAULT_PERSONAL, email.getFromPersonal()); - assertEquals("body", email.getBody()); - assertEquals("subject", email.getSubject()); + assertEquals(BODY, email.getBody()); + assertEquals(SUBJECT, email.getSubject()); + assertEquals(REPLY_TO_ADDRESS, email.getReplyToAddress()); + } + + @Test + public void build_missingReplyToAddress_emailIsWellBuilt() { + //given + EmailBuilder.MailBuilderFromAddress mailBuilderFromAddress = EmailBuilder.to(TO).fromAddress(FROM_ADDRESS).fromPersonal + (FROM_PERSONAL).body(BODY).subject(SUBJECT); + + //when + Email email = mailBuilderFromAddress.build(); + + //then + assertEquals(TO, email.getTo()); + assertEquals(FROM_ADDRESS, email.getFromAddress()); + assertEquals(FROM_PERSONAL, email.getFromPersonal()); + assertEquals(BODY, email.getBody()); + assertEquals(SUBJECT, email.getSubject()); + assertEquals("", email.getReplyToAddress()); } } diff --git a/appengine-mail/src/test/java/com/arcbees/appengine/mail/SendEmailTaskTest.java b/appengine-mail/src/test/java/com/arcbees/appengine/mail/SendEmailTaskTest.java index 7d668a4..ab0f223 100644 --- a/appengine-mail/src/test/java/com/arcbees/appengine/mail/SendEmailTaskTest.java +++ b/appengine-mail/src/test/java/com/arcbees/appengine/mail/SendEmailTaskTest.java @@ -18,6 +18,7 @@ public void run_mockedTransport_transportSendAnyMessage() throws MessagingExcept when(email.getFromAddress()).thenReturn("a@a.com"); when(email.getFromPersonal()).thenReturn("A Personal"); when(email.getTo()).thenReturn("b@b.com"); + when(email.getReplyToAddress()).thenReturn("c@c.com"); Transport transport = mock(Transport.class); SendEmailTask sendEmailTask = new SendEmailTask(email, transport); From f80dc7caa2ca782386aa10b3dd6fbaeada74bbc7 Mon Sep 17 00:00:00 2001 From: Renaud Laine Date: Fri, 5 Jun 2015 11:47:13 -0400 Subject: [PATCH 2/4] PR comments fix --- .../arcbees/appengine/mail/EmailBuilder.java | 17 ++++---- .../arcbees/appengine/mail/SendEmailTask.java | 10 +++-- .../appengine/mail/MailBuilderFromTest.java | 42 ++++++++++++------- 3 files changed, 42 insertions(+), 27 deletions(-) diff --git a/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailBuilder.java b/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailBuilder.java index d046e3f..9864b09 100644 --- a/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailBuilder.java +++ b/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailBuilder.java @@ -75,7 +75,7 @@ public MailBuilderFromAddress replyToAddress(String replyToAddress) { } public Email build() { - return new EmailImpl(mailBuilderTo.to, fromAddress, fromPersonal, subject, body, replyToAddress); + return new EmailImpl(this); } } @@ -87,14 +87,13 @@ private static class EmailImpl implements Email { private final String body; private final String replyToAddress; - private EmailImpl(String to, String fromAddress, String fromPersonal, String subject, String body, - String replyToAddress) { - this.to = to; - this.fromAddress = fromAddress; - this.subject = subject; - this.fromPersonal = fromPersonal; - this.body = body; - this.replyToAddress = replyToAddress; + private EmailImpl(MailBuilderFromAddress builder) { + this.to = builder.mailBuilderTo.to; + this.fromAddress = builder.fromAddress; + this.subject = builder.subject; + this.fromPersonal = builder.fromPersonal; + this.body = builder.body; + this.replyToAddress = builder.replyToAddress; } @Override diff --git a/appengine-mail/src/main/java/com/arcbees/appengine/mail/SendEmailTask.java b/appengine-mail/src/main/java/com/arcbees/appengine/mail/SendEmailTask.java index be4e60a..eecaf09 100644 --- a/appengine-mail/src/main/java/com/arcbees/appengine/mail/SendEmailTask.java +++ b/appengine-mail/src/main/java/com/arcbees/appengine/mail/SendEmailTask.java @@ -29,6 +29,7 @@ import javax.mail.internet.MimeMessage; import com.google.appengine.api.taskqueue.DeferredTask; +import com.google.appengine.repackaged.com.google.common.base.Strings; public class SendEmailTask implements DeferredTask { private static final String CONTENT_TYPE = "text/html"; @@ -58,9 +59,12 @@ public void run() { message.addRecipient(Message.RecipientType.TO, new InternetAddress(email.getTo())); message.setSubject(email.getSubject()); message.setContent(email.getBody(), CONTENT_TYPE); - message.setReplyTo(new Address[] { - new InternetAddress(email.getReplyToAddress()) - }); + + if (Strings.isNullOrEmpty(email.getReplyToAddress())) { + message.setReplyTo(new Address[] { + new InternetAddress(email.getReplyToAddress()) + }); + } transport.send(message); } catch (MessagingException e) { diff --git a/appengine-mail/src/test/java/com/arcbees/appengine/mail/MailBuilderFromTest.java b/appengine-mail/src/test/java/com/arcbees/appengine/mail/MailBuilderFromTest.java index 51894ba..8efc2fb 100644 --- a/appengine-mail/src/test/java/com/arcbees/appengine/mail/MailBuilderFromTest.java +++ b/appengine-mail/src/test/java/com/arcbees/appengine/mail/MailBuilderFromTest.java @@ -1,12 +1,9 @@ -/** +/* * Copyright 2013 ArcBees Inc. - *

* Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - *

* http://www.apache.org/licenses/LICENSE-2.0 - *

* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -21,7 +18,6 @@ import static org.junit.Assert.assertEquals; public class MailBuilderFromTest { - public static final String TO = "to"; public static final String FROM_ADDRESS = "fromAddress"; public static final String FROM_PERSONAL = "fromPersonal"; @@ -32,8 +28,12 @@ public class MailBuilderFromTest { @Test public void build_allFieldsFilled_emailIsWellBuilt() { //given - EmailBuilder.MailBuilderFromAddress mailBuilderFromAddress = EmailBuilder.to(TO).fromAddress(FROM_ADDRESS).fromPersonal - (FROM_PERSONAL).body(BODY).subject(SUBJECT).replyToAddress(REPLY_TO_ADDRESS); + EmailBuilder.MailBuilderFromAddress mailBuilderFromAddress = EmailBuilder.to(TO) + .fromAddress(FROM_ADDRESS) + .fromPersonal(FROM_PERSONAL) + .body(BODY) + .subject(SUBJECT) + .replyToAddress(REPLY_TO_ADDRESS); //when Email email = mailBuilderFromAddress.build(); @@ -50,8 +50,11 @@ public void build_allFieldsFilled_emailIsWellBuilt() { @Test public void build_missingBody_emailIsWellBuilt() { //given - EmailBuilder.MailBuilderFromAddress mailBuilderFromAddress = EmailBuilder.to(TO).fromAddress(FROM_ADDRESS).fromPersonal - (FROM_PERSONAL).subject(SUBJECT).replyToAddress(REPLY_TO_ADDRESS); + EmailBuilder.MailBuilderFromAddress mailBuilderFromAddress = EmailBuilder.to(TO) + .fromAddress(FROM_ADDRESS) + .fromPersonal(FROM_PERSONAL) + .subject(SUBJECT) + .replyToAddress(REPLY_TO_ADDRESS); //when Email email = mailBuilderFromAddress.build(); @@ -68,8 +71,11 @@ public void build_missingBody_emailIsWellBuilt() { @Test public void build_missingSubject_emailIsWellBuilt() { //given - EmailBuilder.MailBuilderFromAddress mailBuilderFromAddress = EmailBuilder.to(TO).fromAddress(FROM_ADDRESS).fromPersonal - (FROM_PERSONAL).body(BODY).replyToAddress(REPLY_TO_ADDRESS); + EmailBuilder.MailBuilderFromAddress mailBuilderFromAddress = EmailBuilder.to(TO) + .fromAddress(FROM_ADDRESS) + .fromPersonal(FROM_PERSONAL) + .body(BODY) + .replyToAddress(REPLY_TO_ADDRESS); //when Email email = mailBuilderFromAddress.build(); @@ -86,8 +92,11 @@ public void build_missingSubject_emailIsWellBuilt() { @Test public void build_missingPersonal_emailIsWellBuilt() { //given - EmailBuilder.MailBuilderFromAddress mailBuilderFromAddress = EmailBuilder.to(TO).fromAddress(FROM_ADDRESS).body - (BODY).subject(SUBJECT).replyToAddress(REPLY_TO_ADDRESS); + EmailBuilder.MailBuilderFromAddress mailBuilderFromAddress = EmailBuilder.to(TO) + .fromAddress(FROM_ADDRESS) + .body(BODY) + .subject(SUBJECT) + .replyToAddress(REPLY_TO_ADDRESS); //when Email email = mailBuilderFromAddress.build(); @@ -104,8 +113,11 @@ public void build_missingPersonal_emailIsWellBuilt() { @Test public void build_missingReplyToAddress_emailIsWellBuilt() { //given - EmailBuilder.MailBuilderFromAddress mailBuilderFromAddress = EmailBuilder.to(TO).fromAddress(FROM_ADDRESS).fromPersonal - (FROM_PERSONAL).body(BODY).subject(SUBJECT); + EmailBuilder.MailBuilderFromAddress mailBuilderFromAddress = EmailBuilder.to(TO) + .fromAddress(FROM_ADDRESS) + .fromPersonal(FROM_PERSONAL) + .body(BODY) + .subject(SUBJECT); //when Email email = mailBuilderFromAddress.build(); From 65ce32beabb1d0cd3bbf87c51262f983b8e633f6 Mon Sep 17 00:00:00 2001 From: Elrhino Date: Fri, 5 Jun 2015 11:55:08 -0400 Subject: [PATCH 3/4] Fixed copyright formatting --- .../java/com/arcbees/appengine/mail/Email.java | 2 +- .../com/arcbees/appengine/mail/EmailBuilder.java | 8 ++++---- .../com/arcbees/appengine/mail/EmailSender.java | 2 +- .../arcbees/appengine/mail/EmailSenderImpl.java | 2 +- .../com/arcbees/appengine/mail/EmailService.java | 2 +- .../arcbees/appengine/mail/SendEmailTask.java | 2 +- .../appengine/mail/TaskOptionsBuilder.java | 16 ++++++++++++++++ .../mail/TaskOptionsWithPayloadBuilder.java | 16 ++++++++++++++++ .../com/arcbees/appengine/mail/Transport.java | 16 ++++++++++++++++ .../arcbees/appengine/mail/TransportImpl.java | 16 ++++++++++++++++ .../arcbees/appengine/mail/EmailSenderTest.java | 2 +- .../arcbees/appengine/mail/EmailServiceTest.java | 2 +- .../appengine/mail/MailBuilderFromTest.java | 3 +++ .../appengine/mail/SendEmailTaskTest.java | 16 ++++++++++++++++ 14 files changed, 94 insertions(+), 11 deletions(-) diff --git a/appengine-mail/src/main/java/com/arcbees/appengine/mail/Email.java b/appengine-mail/src/main/java/com/arcbees/appengine/mail/Email.java index f3d95d0..bea422e 100644 --- a/appengine-mail/src/main/java/com/arcbees/appengine/mail/Email.java +++ b/appengine-mail/src/main/java/com/arcbees/appengine/mail/Email.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2013 ArcBees Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not diff --git a/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailBuilder.java b/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailBuilder.java index 9864b09..9981229 100644 --- a/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailBuilder.java +++ b/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailBuilder.java @@ -1,12 +1,12 @@ -/** +/* * Copyright 2013 ArcBees Inc. - *

+ * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - *

+ * * http://www.apache.org/licenses/LICENSE-2.0 - *

+ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the diff --git a/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailSender.java b/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailSender.java index 920c04f..54e14f3 100644 --- a/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailSender.java +++ b/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailSender.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2013 ArcBees Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not diff --git a/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailSenderImpl.java b/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailSenderImpl.java index b61831c..6726dc1 100644 --- a/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailSenderImpl.java +++ b/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailSenderImpl.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2013 ArcBees Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not diff --git a/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailService.java b/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailService.java index fdd0b1e..0427a55 100644 --- a/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailService.java +++ b/appengine-mail/src/main/java/com/arcbees/appengine/mail/EmailService.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2013 ArcBees Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not diff --git a/appengine-mail/src/main/java/com/arcbees/appengine/mail/SendEmailTask.java b/appengine-mail/src/main/java/com/arcbees/appengine/mail/SendEmailTask.java index eecaf09..94cbc83 100644 --- a/appengine-mail/src/main/java/com/arcbees/appengine/mail/SendEmailTask.java +++ b/appengine-mail/src/main/java/com/arcbees/appengine/mail/SendEmailTask.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2013 ArcBees Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not diff --git a/appengine-mail/src/main/java/com/arcbees/appengine/mail/TaskOptionsBuilder.java b/appengine-mail/src/main/java/com/arcbees/appengine/mail/TaskOptionsBuilder.java index 82bee03..9c510ab 100644 --- a/appengine-mail/src/main/java/com/arcbees/appengine/mail/TaskOptionsBuilder.java +++ b/appengine-mail/src/main/java/com/arcbees/appengine/mail/TaskOptionsBuilder.java @@ -1,3 +1,19 @@ +/* + * Copyright 2013 ArcBees Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + package com.arcbees.appengine.mail; import com.google.appengine.api.taskqueue.DeferredTask; diff --git a/appengine-mail/src/main/java/com/arcbees/appengine/mail/TaskOptionsWithPayloadBuilder.java b/appengine-mail/src/main/java/com/arcbees/appengine/mail/TaskOptionsWithPayloadBuilder.java index a41307f..1f399ac 100644 --- a/appengine-mail/src/main/java/com/arcbees/appengine/mail/TaskOptionsWithPayloadBuilder.java +++ b/appengine-mail/src/main/java/com/arcbees/appengine/mail/TaskOptionsWithPayloadBuilder.java @@ -1,3 +1,19 @@ +/* + * Copyright 2013 ArcBees Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + package com.arcbees.appengine.mail; import com.google.appengine.api.taskqueue.DeferredTask; diff --git a/appengine-mail/src/main/java/com/arcbees/appengine/mail/Transport.java b/appengine-mail/src/main/java/com/arcbees/appengine/mail/Transport.java index 5f58e84..cea9ebf 100644 --- a/appengine-mail/src/main/java/com/arcbees/appengine/mail/Transport.java +++ b/appengine-mail/src/main/java/com/arcbees/appengine/mail/Transport.java @@ -1,3 +1,19 @@ +/* + * Copyright 2013 ArcBees Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + package com.arcbees.appengine.mail; import java.io.Serializable; diff --git a/appengine-mail/src/main/java/com/arcbees/appengine/mail/TransportImpl.java b/appengine-mail/src/main/java/com/arcbees/appengine/mail/TransportImpl.java index 902f4a8..06c3e05 100644 --- a/appengine-mail/src/main/java/com/arcbees/appengine/mail/TransportImpl.java +++ b/appengine-mail/src/main/java/com/arcbees/appengine/mail/TransportImpl.java @@ -1,3 +1,19 @@ +/* + * Copyright 2013 ArcBees Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + package com.arcbees.appengine.mail; import javax.mail.Message; diff --git a/appengine-mail/src/test/java/com/arcbees/appengine/mail/EmailSenderTest.java b/appengine-mail/src/test/java/com/arcbees/appengine/mail/EmailSenderTest.java index 90a0403..3f8771d 100644 --- a/appengine-mail/src/test/java/com/arcbees/appengine/mail/EmailSenderTest.java +++ b/appengine-mail/src/test/java/com/arcbees/appengine/mail/EmailSenderTest.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2013 ArcBees Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not diff --git a/appengine-mail/src/test/java/com/arcbees/appengine/mail/EmailServiceTest.java b/appengine-mail/src/test/java/com/arcbees/appengine/mail/EmailServiceTest.java index fe2897a..c590284 100644 --- a/appengine-mail/src/test/java/com/arcbees/appengine/mail/EmailServiceTest.java +++ b/appengine-mail/src/test/java/com/arcbees/appengine/mail/EmailServiceTest.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2013 ArcBees Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not diff --git a/appengine-mail/src/test/java/com/arcbees/appengine/mail/MailBuilderFromTest.java b/appengine-mail/src/test/java/com/arcbees/appengine/mail/MailBuilderFromTest.java index 8efc2fb..990dc28 100644 --- a/appengine-mail/src/test/java/com/arcbees/appengine/mail/MailBuilderFromTest.java +++ b/appengine-mail/src/test/java/com/arcbees/appengine/mail/MailBuilderFromTest.java @@ -1,9 +1,12 @@ /* * Copyright 2013 ArcBees Inc. + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at + * * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the diff --git a/appengine-mail/src/test/java/com/arcbees/appengine/mail/SendEmailTaskTest.java b/appengine-mail/src/test/java/com/arcbees/appengine/mail/SendEmailTaskTest.java index ab0f223..44b780e 100644 --- a/appengine-mail/src/test/java/com/arcbees/appengine/mail/SendEmailTaskTest.java +++ b/appengine-mail/src/test/java/com/arcbees/appengine/mail/SendEmailTaskTest.java @@ -1,3 +1,19 @@ +/* + * Copyright 2013 ArcBees Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + package com.arcbees.appengine.mail; import javax.mail.Message; From 6331821be659fb0ba17dbd812705c5b163a3982d Mon Sep 17 00:00:00 2001 From: Elrhino Date: Tue, 23 Jun 2015 11:59:02 -0400 Subject: [PATCH 4/4] Fixed imports --- .../src/main/java/com/arcbees/appengine/mail/SendEmailTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appengine-mail/src/main/java/com/arcbees/appengine/mail/SendEmailTask.java b/appengine-mail/src/main/java/com/arcbees/appengine/mail/SendEmailTask.java index 94cbc83..8488f2e 100644 --- a/appengine-mail/src/main/java/com/arcbees/appengine/mail/SendEmailTask.java +++ b/appengine-mail/src/main/java/com/arcbees/appengine/mail/SendEmailTask.java @@ -29,7 +29,7 @@ import javax.mail.internet.MimeMessage; import com.google.appengine.api.taskqueue.DeferredTask; -import com.google.appengine.repackaged.com.google.common.base.Strings; +import com.google.common.base.Strings; public class SendEmailTask implements DeferredTask { private static final String CONTENT_TYPE = "text/html";