karastojko / mailio

mailio is a cross platform C++ library for MIME format and SMTP, POP3 and IMAP protocols. It is based on standard C++ 17 and Boost library.
Other
372 stars 98 forks source link

problem with static library version #161

Closed boomer11111111 closed 5 months ago

boomer11111111 commented 5 months ago

I have a working program that can send an email with an attachment with no problems, using "multi-threaded debug dll" option.

But, when i run the exact same code with "multi-threaded debug", the code does compile and the program does run, but crashes and does not work (screenshot of the crash error window is included here incase it helps).

I also want to mention that i have installed both the default version of the mailio library, and the static one.

I have found that this line here is causing the problem, as the program runs without crashing when i comment it out. The line is the following:

conn.authenticate("xxxxxxxxxxxxxx@gmail.com", "xxxxxxxxxxxx", smtps::auth_method_t::LOGIN);

Rec118_036

Thanks a lot in advance.

karastojko commented 5 months ago

Does it also happen with the smtps_attachment.cpp example?

boomer11111111 commented 5 months ago

That is what i am using, i just got the code from smtps_attachment.cpp. Maybe i am doing something wrong with the linking.

How do i use static library of mailio? I mean how do i link it? Do i need to build a mailio.lib somehow?

Thanks for the response.

boomer11111111 commented 5 months ago

Ok im not sure what was wrong exactly, but i had not linked the mailio library in the right way for sure, so probably that was the reason.