karastojko / mailio

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

Unknown Signal Exception After Sending Email #110

Closed AdamGoris closed 1 year ago

AdamGoris commented 2 years ago

I installed mailio using vcpkg and have version 0.21.0

After sending an email, I am getting an Unknown signal exception at: mailio/mailboxes.hpp mailio.mail_address (line 33): image

I also notice that my from and to variables which are mailio_addresses have the following errors: image

The full error message for the from variable address is: <error reading variable: Cannot create a lazy string with address 0x0, and a non-zero length.><error reading variable: Cannot create a lazy string with address 0x0, and a non-zero length.>

Also something that may be related is if I set message from and recipient as is done in the examples:

msg.from(mail_address(sender_name, sender_email));
msg.add_recipient(mail_address(receiver_name, receiver_email));

I get the same error as above. But if I do:

mail_address from = mail_address(sender_name, sender_email);
msg.from(from);
mail_address to = mail_address(receiver_name, receiver_email);
msg.add_recipient(to);

The message can be constructed and sent, but then exits due to the Unknown signal exception.

karastojko commented 2 years ago

Thanks for reporting this. The environment is Windows/Visual Studio?

AdamGoris commented 2 years ago

I am using a Windows/MinGW environment

ercolesptr commented 1 year ago

I was able to make it work with windows/mingw but had to add these to the linker settings link libraries:

libcrypto.a libssl.a ws2_32

karastojko commented 1 year ago

Thanks for the clarification.