Electroneum
epee::net_utils::smtp::smtp_client Class Reference

#include <smtp.h>

Public Member Functions

 smtp_client (std::string pServer, unsigned int pPort, std::string pUser, std::string pPassword)
 
bool Send (std::string pFrom, std::string pTo, std::string pSubject, std::string pMessage)
 

Detailed Description

Definition at line 57 of file smtp.h.

Constructor & Destructor Documentation

◆ smtp_client()

epee::net_utils::smtp::smtp_client::smtp_client ( std::string  pServer,
unsigned int  pPort,
std::string  pUser,
std::string  pPassword 
)
inline

Definition at line 60 of file smtp.h.

60  :
61  mServer(pServer),mPort(pPort),mUserName(pUser),mPassword(pPassword),mSocket(mIOService),mResolver(mIOService)
62  {
63  tcp::resolver::query qry(mServer,boost::lexical_cast<std::string>( mPort ));
64  mResolver.async_resolve(qry,boost::bind(&smtp_client::handleResolve,this,boost::asio::placeholders::error,
65  boost::asio::placeholders::iterator));
66  }
error
Tracks LMDB error codes.
Definition: error.h:44

Member Function Documentation

◆ Send()

bool epee::net_utils::smtp::smtp_client::Send ( std::string  pFrom,
std::string  pTo,
std::string  pSubject,
std::string  pMessage 
)
inline

Definition at line 67 of file smtp.h.

68  {
69  mHasError = true;
70  mFrom=pFrom;
71  mTo=pTo;
72  mSubject=pSubject;
73  mMessage=pMessage;
74  mIOService.run();
75  return !mHasError;
76  }
Here is the caller graph for this function:

The documentation for this class was generated from the following file: