예제 #1
0
파일: AuthService.C 프로젝트: ansons/wt
void AuthService::sendMail(const Mail::Message& message) const
{
    Mail::Message m = message;

    if (m.from().empty()) {
        std::string senderName = "Wt Auth module";
        std::string senderAddress = "*****@*****.**";

        WApplication::readConfigurationProperty("auth-mail-sender-name",
                                                senderName);
        WApplication::readConfigurationProperty("auth-mail-sender-address",
                                                senderAddress);
#ifndef WT_TARGET_JAVA
        m.setFrom(Mail::Mailbox(senderAddress, WString::fromUTF8(senderName)));
#else
        m.setFrom(Mail::Mailbox(senderAddress, senderName));
#endif
    }

    m.write(std::cout);

    MailUtils::sendMail(m);
}
예제 #2
0
void WsNewsLetter::sendMail(const Mail::Message& message) const
{
  Mail::Message m = message;

  if (m.from().empty()) {
    std::string senderName = "Ws letter module";
    std::string senderAddress = "*****@*****.**";

    m.setFrom(Mail::Mailbox(senderAddress, WString::fromUTF8(senderName)));
  }

  m.write(std::cout);

  Mail::Client client;
  client.connect();
  client.send(m);
}
예제 #3
0
void AuthService::sendMail(const Mail::Message& message) const
{
  Mail::Message m = message;

  if (m.from().empty()) {
    std::string senderName = "Wt Auth module";
    std::string senderAddress = "*****@*****.**";

    WApplication::readConfigurationProperty("auth-mail-sender-name",
					    senderName);
    WApplication::readConfigurationProperty("auth-mail-sender-address",
					    senderAddress);

    m.setFrom(Mail::Mailbox(senderAddress, WString::fromUTF8(senderName)));
  }

  m.write(std::cout);

  Mail::Client client;
  client.connect();
  client.send(m);
}