Hello
Does someone know how to send a mail with SFML C++?
My idea was to use TCP sockets, and send SMTP commands to the SMTP-server; but it ain't working.
This is my code:
sf::TcpSocket socket;
sf::Packet packet;
socket.send("smtp.gmail.com", 587);
packet << "Hi there!";
socket.send(packet);
packet.clear();
packet << "MAIL FROM: mymail@mail.com";
socket.send(packet);
packet.clear();
packet << "RCPT TO: mymail@mail.com";
socket.send(packet);
packet.clear();
packet << "DATA";
socket.send(packet);
packet.clear();
packet << "Message2";
socket.send(packet);
packet.clear();
packet << ".";
socket.send(packet);
packet.clear();
packet << "QUIT";
socket.send(packet);
packet.clear();
I get no compiling error, but I just don't receive a mail.
Thanks for reading,
Niely