Now email password is hidden
This commit is contained in:
parent
2f00a123d8
commit
7d7d089147
|
@ -1 +1 @@
|
|||
.password
|
||||
password.h
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.5)
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project("ContractNotifier")
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
@ -13,8 +13,8 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
|
|||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
|
||||
|
||||
# Set c++ standard
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
# Set C++ standard
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# Set build type definitions.
|
||||
|
@ -41,7 +41,7 @@ add_subdirectory("vendor/mail/")
|
|||
file(GLOB_RECURSE hdrs "src/*.h")
|
||||
file(GLOB_RECURSE srcs "src/*.cpp")
|
||||
file(GLOB_RECURSE ui "src/*.ui")
|
||||
include_directories("src/")
|
||||
include_directories("." "src/")
|
||||
|
||||
add_executable(contractNotifier ${hdrs} ${srcs})
|
||||
target_link_libraries(contractNotifier PUBLIC Qt5::Core Qt5::Widgets Boost::serialization mailio ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
|
Binary file not shown.
|
@ -8,6 +8,7 @@
|
|||
#include "contract.h"
|
||||
#include "category.h"
|
||||
#include "db.h"
|
||||
#include "password.h"
|
||||
|
||||
#include <mailio/message.hpp>
|
||||
#include <mailio/smtp.hpp>
|
||||
|
@ -87,7 +88,7 @@ auto notify_sendEmail(const std::string &recipient_addr, const std::string &subj
|
|||
// connect to server
|
||||
smtps conn("smtp.gmail.com", 587);
|
||||
// modify username/password to use real credentials
|
||||
conn.authenticate("contractnotifier@gmail.com", "de3^BGg5Tc9Dy941VUWB1Cgo$uqUECnwuJQR5cBVmgSL!NU8zfwV8Xk*QLx*QdV^q9RvICt^3Ic7C@4qYw@Uhl#56PU0fQJ&7NI", smtps::auth_method_t::START_TLS);
|
||||
conn.authenticate("contractnotifier@gmail.com", EMAIL_PASSWORD, smtps::auth_method_t::START_TLS);
|
||||
conn.submit(msg);
|
||||
}
|
||||
catch (smtp_error& exc) {
|
||||
|
|
|
@ -13,7 +13,7 @@ int main(int argc, char *argv[]) {
|
|||
Contract contract;
|
||||
QDate date;
|
||||
date = QDate::currentDate();
|
||||
date = date.addDays(-2);
|
||||
date = date.addDays(2);
|
||||
contract_setExpiry(contract, date);
|
||||
contract._name = "akham";
|
||||
contract._desc = "This is akham";
|
||||
|
|
Loading…
Reference in New Issue