Not ANOTHER E-Mail component.
Can’t someone create something fun for a change?
A Plugin to use excess client computing power to mine Bitcoin or something useful like that?
Well, sadly yes!
Yours truly is delivering to you yet another E-Mail component to add to your growing toolchest of more or less useless code.
And mine is bigger and much more powerful, also it’s by me, Alex, so it obviously immediately climbs to the top of your choices. Doesn’t it?
Oh get over it already, say what you want to say and be done with it!
4D IC command compatibility!
Yeah, you read that right!
Well, maybe I use a somewhat loose definition of full compatibility, but anyway, you will get my point.
Most commands are actually identical with the difference, that I added the catch string CUrl in front of the command names and the longint used to pass the SMTP reference is now a C_OBJECT.
Cut to the chase man!
Ok, here is what it would look like in 4D IC
$l_Error:=SMTP_Subject ($l_SMTP;"CUrlSmtp Testmail")
$l_Error:=SMTP_Body ($l_SMTP;"<html><body><h2>Hello there</h2><p>This is a test mail from CUrlSmtp for 4D</p><img width=200 height=200 id=\"abcd\" src=\"cid:abcd\"><p>we even embedded an image</p></body></html>";4)
in a nutshell, yes, and so what?
And here is using my strong and stable genius solution:
$l_Error:=CUrlSmtp_Subject ($o_Mail;"CUrlSmtp Testmail")
$l_Error:=CUrlSmtp_Body ($o_Mail;"<html><body><h2>Hello there</h2><p>This is a test mail from CUrlSmtp for 4D</p><img width=200 height=200 id=\"abcd\" src=\"cid:abcd\"><p>we even embedded an image</p></body></html>";4)
I fail to be impressed! You wasted my time for that?
The wheel reinvented?
Ah, my dear friend, you are missing the point!
- Full communication debugging
- Correct creation of multipart MIME messages with inline pictures for HTML and attachments
- Handling of most ALL authentication systems
- Bodies (html and plain) encoded quoted printable, much less trouble with spam filters than B64
- Full SSL support
- Runs on regular gas, no catalytic converter
- Retains all nutrients in the message
Anyway, the point is, it solves quite a few problems we tend to have with 4D IC SMTP communication, it is fast and robust and obviously works on 32 and 64 Bit with 4D from 15.5 up to the current version.
Maybe it solves a problem you have, it did for me, and trying it is quick and painless.
In order for it to work, you will need 2 plugins from Keisuke:
You made it so far?
A few assumptions
For attachments I have trashed all the options like BinHex, Resource Fork, DataFork, yadda, yadda, yadda.
Attachments are always and exclusively sent as Base64.
Due to a problem in the PlugIn interface in earlier 4D Versions, this only works with Version 15.5 and onwards, 15R Versions need to be checked.
As always you can have the password to the source for a teeny, tiny, huge donation, Paypal donate button is still on the sidebar.
Although most commands are really fully compatible with the corresponding 4D IC commands, some behave a bit different, so I have created a page with the documentation, you can see it here:
Ready for a spin?
Here you go: