Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 3 commits
  • 5 files changed
  • 0 commit comments
  • 2 contributors
Commits on May 14, 2013
@spektom spektom Added support for BCC address 0c1fef0
Commits on May 28, 2013
@spektom spektom - Fixed Unit test
- Target Java 1.5
ae1d11c
Commits on Jun 22, 2013
@pbackx Merge pull request #2 from spektom/master
Added support for BCC address
6707584
View
21 pom.xml
@@ -3,7 +3,7 @@
<groupId>com.cribbstechnologies.clients</groupId>
<artifactId>mandrillClient</artifactId>
<version>0.0.1-SNAPSHOT</version>
-
+
<dependencies>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
@@ -33,7 +33,20 @@
<version>2.0</version>
<scope>test</scope>
</dependency>
-
-
</dependencies>
-</project>
+
+
+<build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.1</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
View
1 src/it/java/com/cribbstechnologies/clients/mandrill/it/MessagesTest.java
@@ -68,6 +68,7 @@ public void testSendMessage() {
message.setSubject("This is the subject");
MandrillRecipient[] recipients = new MandrillRecipient[]{new MandrillRecipient(props.getProperty("email.to.name1"), props.getProperty("email.to.address1")), new MandrillRecipient(props.getProperty("email.to.name2"), props.getProperty("email.to.address2"))};
message.setTo(recipients);
+ message.setBcc_address(props.getProperty("email.bcc.address"));
message.setTrack_clicks(true);
message.setTrack_opens(true);
String[] tags = new String[]{"tag1", "tag2", "tag3"};
View
9 src/main/java/com/cribbstechnologies/clients/mandrill/model/MandrillMessage.java
@@ -9,6 +9,7 @@
private String subject;
private String from_email;
private String from_name;
+ private String bcc_address;
private MandrillRecipient[] to;
private boolean track_opens=false;
private boolean track_clicks=false;
@@ -38,6 +39,14 @@ public void setFrom_email(String from_email) {
this.from_email = from_email;
}
+ public String getBcc_address() {
+ return bcc_address;
+ }
+
+ public void setBcc_address(String bcc_address) {
+ this.bcc_address = bcc_address;
+ }
+
public String getFrom_name() {
return from_name;
}
View
4 src/test/java/com/cribbstechnologies/clients/mandrill/request/MandrillRESTRequestTest.java
@@ -232,6 +232,7 @@ public void testGetPostDataMandrillMessageRequest() throws Exception {
to[0] = new MandrillRecipient("to1", "to1");
to[1] = new MandrillRecipient("to2", "to2");
mutableMessage.setTo(to);
+ mutableMessage.setBcc_address("bcc@email.com");
mutableMessage.setTrack_opens(false);
mutableMessage.setTrack_clicks(true);
String[] tags = new String[2];
@@ -253,6 +254,7 @@ public void testGetPostDataMandrillMessageRequest() throws Exception {
sb.append(",\"subject\":\"Test subject\"");
sb.append(",\"from_email\":\"from@email.com\"");
sb.append(",\"from_name\":\"From Name\"");
+ sb.append(",\"bcc_address\":\"bcc@email.com\"");
sb.append(",\"to\":[{\"email\":\"to1\",\"name\":\"to1\"},{\"email\":\"to2\",\"name\":\"to2\"}]");
sb.append(",\"track_opens\":false");
sb.append(",\"track_clicks\":true");
@@ -656,4 +658,4 @@ public void testTemplateListResponseConversion() throws IOException {
assertEquals("example created_at11", tr.getCreated_at());
assertEquals("example updated_at11", tr.getUpdated_at());
}
-}
+}
View
3 src/test/resources/mandrill.properties
@@ -4,4 +4,5 @@ email.to.name1=Brian Cribbs
email.to.address1=brian@cribbstechnologies.com
email.to.name2=Brian Cribbs
email.to.address2=briancribbs@gmail.com
-verify.email=radar@cribbstechnologies.com
+email.bcc.address=briancribbs@gmail.com
+verify.email=radar@cribbstechnologies.com

No commit comments for this range

Something went wrong with that request. Please try again.