I am using EASendEmail with Visual C++. After I compile the code and run it, I get an error which reads: "Debug Error! /Program:[file path] /abort() has been called/ (press retry to debug the application)"
The code is from this website:https://www.emailarchitect.net/easendmail/kb/vc.aspx?cat=0
The error is occurring in the lins:
oSmtp->LicenseCode = _T("TryIt");
'
_tprintf(_T("Start to send email ...\r\n"));
I have tried debugging mode in visual studio and it lead me to an unhandled expression in an attached library and an error at a specific memory location.
c++
#include "pch.h"
#include "easendmailobj.tlh"
#include <tchar.h>
#include <iostream>
using namespace std;
using namespace EASendMailObjLib;
int _tmain(int argc, _TCHAR* argv[])
{
::CoInitialize(NULL);
IMailPtr oSmtp = NULL;
oSmtp.CreateInstance("EASendMailObj.Mail");//<- one cause of the error
oSmtp->LicenseCode = _T("TryIt");
//...
_tprintf(_T("Start to send email ...\r\n"));//<- one cause of the error
the error:https://i.stack.imgur.com/SQDwr.jpg