diff --git a/src/challenge-module/challenge-email.cpp b/src/challenge-module/challenge-email.cpp
index fc25d8c..c63961c 100644
--- a/src/challenge-module/challenge-email.cpp
+++ b/src/challenge-module/challenge-email.cpp
@@ -65,7 +65,7 @@
   }
 
   std::string emailCode = generateSecretCode();
-  sendEmail(emailAddress, emailCode);
+  sendEmail(emailAddress, emailCode, request.getCaName().toUri());
 
   request.setStatus(NEED_CODE);
   request.setChallengeType(CHALLENGE_TYPE);
@@ -185,30 +185,17 @@
 }
 
 void
-ChallengeEmail::sendEmail(const std::string& emailAddress, const std::string& secret) const
+ChallengeEmail::sendEmail(const std::string& emailAddress, const std::string& secret,
+                          const std::string& caName) const
 {
-  pid_t pid = fork();
-
-  if (pid < 0) {
-    _LOG_TRACE("Cannot fork before trying to call email sending script");
+  std::string command = m_sendEmailScript;
+  command += " \"" + emailAddress + "\" \"" + secret + "\" \"" + caName + "\"";
+  int result = system(command.c_str());
+  if (result == -1) {
+    _LOG_TRACE("EmailSending Script " + m_sendEmailScript + " fails.");
   }
-  else if (pid == 0) {
-    int ret;
-    std::vector<char> emailParam(emailAddress.begin(), emailAddress.end());
-    emailParam.push_back('\0');
-
-    std::vector<char> secretParam(secret.begin(), secret.end());
-    secretParam.push_back('\0');
-
-    std::vector<char> defaultParam(m_sendEmailScript.begin(), m_sendEmailScript.end());
-    defaultParam.push_back('\0');
-
-    char* argv[] = {&defaultParam[0], &emailParam[0], &secretParam[0], nullptr};
-    ret = execve(m_sendEmailScript.c_str(), argv, nullptr);
-
-    BOOST_THROW_EXCEPTION(Error("Email sending script went wrong, error code: " + std::to_string(ret)));
-  }
-
+  _LOG_TRACE("EmailSending Script " + m_sendEmailScript +
+             " was executed successfully with return value" + std::to_string(result) + ".");
   return;
 }
 
diff --git a/src/challenge-module/challenge-email.hpp b/src/challenge-module/challenge-email.hpp
index 0f0d935..a014d00 100644
--- a/src/challenge-module/challenge-email.hpp
+++ b/src/challenge-module/challenge-email.hpp
@@ -30,7 +30,10 @@
 /**
  * @brief Provide Email based challenge
  *
+ * For challenge design
  * @sa https://github.com/named-data/ndncert/wiki/NDN-Certificate-Management-Protocol
+ * For deployment instructions:
+ * @sa https://github.com/named-data/ndncert/wiki/Deploy-Email-Challenge
  *
  * The main process of this challenge module is:
  *   1. Requester provides its email address.
@@ -49,7 +52,7 @@
 class ChallengeEmail : public ChallengeModule
 {
 public:
-  ChallengeEmail(const std::string& scriptPath = "send-mail.sh",
+  ChallengeEmail(const std::string& scriptPath = "ndncert-send-email-challenge",
                  const size_t& maxAttemptTimes = 3,
                  const time::seconds secretLifetime = time::minutes(20));
 
@@ -79,7 +82,8 @@
   isValidEmailAddress(const std::string& emailAddress);
 
   void
-  sendEmail(const std::string& emailAddress, const std::string& secret) const;
+  sendEmail(const std::string& emailAddress, const std::string& secret,
+            const std::string& caName) const;
 
 PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   static std::tuple<time::system_clock::TimePoint, std::string, int>
diff --git a/src/client-module.cpp b/src/client-module.cpp
index 67c6201..9994c31 100644
--- a/src/client-module.cpp
+++ b/src/client-module.cpp
@@ -94,7 +94,7 @@
   certRequest.setName(Name(state->m_key.getName()).append("cert-request").appendVersion());
   certRequest.setContentType(tlv::ContentType_Key);
   certRequest.setFreshnessPeriod(time::hours(24));
-  certRequest.setContent(state->m_key.getPublicKey().get<uint8_t>(), state->m_key.getPublicKey().size());
+  certRequest.setContent(state->m_key.getPublicKey().data(), state->m_key.getPublicKey().size());
   SignatureInfo signatureInfo;
   signatureInfo.setValidityPeriod(security::ValidityPeriod(time::system_clock::now(),
                                                            time::system_clock::now() + time::days(10)));
