mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
![]() SMTP was improved to use the new abstract stuff a while ago, but it was only implemented with raw socket abstract transport, and a couple of 'api cheats' remained passing network information for the peer connection through the supposedly abstract apis. This patch adds a flexible generic token array to supply abstract transport-specific information through the abstract apis, removing the network information from the abstract connect() op. The SMTP minimal example is modified to use this new method to pass the network information. The abstract transport struct was opaque, but there are real uses to override it in user code, so this patch also makes it part of the public abi. |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
main.c | ||
README.md |
lws api test smtp client
Demonstrates how to send email through your local MTA
build
Requires lws was built with -DLWS_WITH_SMTP=1
at cmake.
$ cmake . && make
usage
Commandline option | Meaning |
---|---|
-d | Debug verbosity in decimal, eg, -d15 |
-r recipient@whatever.com | Send the test email to this email address |
$ ./lws-api-test-smtp_client -r andy@warmcat.com
[2019/04/17 05:12:06:5293] USER: LWS API selftest: SMTP client
[2019/04/17 05:12:06:5635] NOTICE: LGSSMTP_IDLE: connecting to 127.0.0.1:25
[2019/04/17 05:12:06:6238] NOTICE: email_sent_or_failed: sent OK
[2019/04/17 05:12:06:6394] USER: Completed: PASS