[Help]How to connect to a smtp server?

I use the FSocket link to the specified SMTP server, but I found that when the server sends an ACK request when the FSocket did not respond.
Is this an FSocket defect? Or is it because my setup has a problem?

did you solve this and can you share your code?

Yes, i solved it. Use the libcurl in the engine thridparty folder.

    AddEngineThirdPartyPrivateStaticDependencies(Target, "libcurl");
    AddEngineThirdPartyPrivateStaticDependencies(Target, "OpenSSL");

Thank you very much! headers can included finally.

and if you can - could you give small example, please.

It’s like this libcurl example - smtp-mail.c or there are a lot of nuisances?

The example on the web site is not good about the part of the header.

My code is here.

hey, thank you.

I’m tried it, but emails arrived empty (without subject, body and etc), may be because my Header .

can you give some advice, please?

link text

I think you should give it the right mail server address and the right account.

	curl_easy_setopt(CurlHandler, CURLOPT_URL, "smtp://smtp.test.org:587");
	curl_easy_setopt(CurlHandler, CURLOPT_MAIL_FROM, "<test@test.test.org>");

I’m changed it for security reason). I’m successfully test my parameters in standard libcurl example - mails arrived fine. but I can’t understand how to properly define variables instead “#define

when I’m using your code - problem in my header because I’m not understood how to properly define some variables in your example.

in source.zip above - I’m include header and cpp with your code.
If you take a glance - I’m very appreciate it :wink:

Sorry, I forget to give you the definition of the context struct.

Here is my plugin, the part of the AsyncAction has some problems, but it can be used as an example of SMTP.

I’m very grateful to you! You are awesome!

issue: “Server response: 550 5.7.1 [184.173.153.200 14] Messages missing a valid address in From: 5.7.1 header, or having no From: header, are not accepted.”

solved by:

MailMessage.Add(TEXT("From: <"));
MailMessage.Add(MailContext.AuthAccount); // on the mailgun AuthAccount the same as email
MailMessage.Add(TEXT(">\r\n"));

about Asynchronous Blueprint Nodes - I think it’s blocking game thread operation, just for execution node asynchronously.

I solved this by creating subclass of FNonAbandonableTask which perform non blocking game thread operation A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums

I attached code of MailBlueprintAsyncAction (h, cpp) also. link text

now everything works fine!
THANK YOU again!)