Answer the question
In order to leave comments, you need to log in
Cross-platform sending to mail in C?
Hello everyone, I didn’t find information anywhere, I know what it Си
is, winsock.h
but I need it to be under Linux.
That is, I can determine the OS preprocessor, but I can’t understand how it should look like, throw off someone where you can read to send email
a message through smtp.yandex.ru
from under Linux
and Windows
?
Answer the question
In order to leave comments, you need to log in
#ifdef _WIN32
#include <winsock2.h>
#else
#include <sys/socket.h>
#endif
WSAStartup
it in macros. WSACleanup
For general tasks, it may be enough.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question