|
// *********************************************************
// メール送信
// 戻り値 : true 成功, false 失敗
// *********************************************************
BOOL LboxBasp::SendMail(
LboxString *LTo, LboxString *LFrom, LboxString *LSubj, LboxString *LBody )
{
return LboxBasp::SendMail(
LTo->szLboxString,
LFrom->szLboxString,
LSubj->szLboxString,
LBody->szLboxString
);
}
BOOL LboxBasp::SendMail(
LPTSTR lpTo, LPTSTR lpFrom, LPTSTR lpSubject, LPTSTR lpBody )
{
this->ErrorDescription.SetChar(0,0);
if ( this->lib == NULL ) {
this->ErrorDescription.operator = (
"Bsmtp.dll がインストールされていません"
);
return false;
}
LPFUNC_BSendMail DllBSendMail;
DllBSendMail =
(LPFUNC_BSendMail)GetProcAddress( lib, "BSendMail" );
if ( DllBSendMail == NULL ) {
return false;
}
int nRet;
this->ErrorDescription.SetChar( 0, 0 );
nRet = DllBSendMail(
this->SMTPServer.szLboxString,
lpTo,
lpFrom,
lpSubject,
lpBody,
"",
this->ErrorDescription.szLboxString
);
if ( !nRet ) {
return false;
}
return true;
}
| |