Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#445 2024-01-19 17:16:44
Re: com_connect - form and contact mailer
Bloke wrote #336419:
So, no good for Yiannis in this instance.
Alas, no.
Sendy (or similar) with Amazon SES is by far the cheapest way to send bulk email.
Sendgrid is pretty good and has a non-profit tier. Mailgun is also good, a support ticket should be able to get you onto the flex plan.
Postmark is something I’ve used in the past with medium-sized campaigns, and that’s good value for money.
From memory, there’re intro credits available to NGOs at Techsoup, too.
is it possible to hook up Txp to use AWS directly?
I’d really like to explore how viable it would be for Textpattern to talk with AWS-compliant services in a future iteration. Stuff like using S3 for file & image storage. There’s more support burden with sending email, since it’s riskier than storing & retrieving files, but I’m sure it’s possible in your capable hands, Stef.
Offline
#446 2024-01-19 17:36:26
Re: com_connect - form and contact mailer
Heh. Seems at least SMTP integration is a piece of cake in 4.9.0.
Offloading file and image storage to S3 would be high on my investigative list in a near future Txp version. It would slot nicely into the image panel changes.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
#447 2024-03-07 19:09:16
- frickinmuck
- Member
- Registered: 2008-05-01
- Posts: 118
Re: com_connect - form and contact mailer
I have a site that’s getting a lot of spam messages through a com_connect form. Is there any way to add a captcha or something? Or maybe a spam setting I’m missing?
PHP version: 8.1.27
com_connect version: 4.7.1
Textpattern version: 4.8.7
Last edited by frickinmuck (2024-03-07 19:34:59)
The AI does not hate you, nor does it love you, but you are made out of atoms which it can use for something else.
Offline
#448 2024-03-07 20:03:38
Re: com_connect - form and contact mailer
There are several options:
- pap_comconnect, which adds a honeypot field to trap unsuspecting bots. It’s not bad but not infallible.
- ext_com_connect_verify for adding email address patterns to block. Yiannis has a list of spam patterns. This is, in my opinion, more effective but needs more hands-on maintenance to add relevant blacklisted terms/email addresses. See also this post. It can be also be modified to block word patterns in the email body instead (see below).*
- and there’s a full-blown ext_captcha that adds hCaptcha / ReCaptcha spam prevention. See also this post.
*If you prefer to block word patterns rather than emails, you need to edit the plugin code as follows:
1. Change the $emailField line to read:
$messageField = trim(ps('com_connect_message'));
2. and further down in the last if (…) {
block, change $emailField
to read $messageField
:
if ($pat && preg_match($pat, $messageField)) {
and
TXP Builders – finely-crafted code, design and txp
Offline
#449 2024-03-07 20:26:45
Re: com_connect - form and contact mailer
Although it’s of no use right now unless you upgrade to 4.9.0-dev, built-in anti spam tools are already available.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
#450 2024-03-07 20:42:47
- frickinmuck
- Member
- Registered: 2008-05-01
- Posts: 118
Re: com_connect - form and contact mailer
Thanks so much, both of you, this is all very helpful.
The AI does not hate you, nor does it love you, but you are made out of atoms which it can use for something else.
Offline
#451 2024-05-19 04:59:30
- astick360
- Member
- Registered: 2022-05-05
- Posts: 23
Re: com_connect - form and contact mailer
SMTP integration with AMS works seamlessly. You have a normal SMTP server with a username and password. However, I noticed that sending via SMTP in AWS is slow. It will be much faster to send AWS via API and such integration would be advisable. Listmonk has it well integrated (here is the link: https://listmonk.app), it is open source, you can probably preview the code. He sends emails quickly via Listmonk. AWS gives you about 50,000 e-mails to send for free per month (maybe it has changed, I don’t know), then the costs are very low anyway, in any case, there is probably nothing cheaper.
Offline
#452 2024-05-19 07:08:51
Re: com_connect - form and contact mailer
astick360 wrote #337220:
It will be much faster to send AWS via API and such integration would be advisable. Listmonk has it well integrated (here is the link: https://listmonk.app)…
I’m not aware of anything special for listmonk but Pete / kuopassa recently posted kuo_mailjet for mailjet that uses the mailjet API. That may possibly only need adjusting for listmonk (depending on how similar their API approaches are). It requires a coffee donation to obtain, or you could ask him to make a listmonk integration for you. He’s quite the specialist at integrating with external services.
TXP Builders – finely-crafted code, design and txp
Offline
#453 2024-05-19 08:08:43
Re: com_connect - form and contact mailer
I’ve noticed that sending over SMTP via AWS is slow too. It is rather annoying.
I’ve looked at the API route and a few things stand out that make integration a little awkward:
- It requires the use of a shared credentials file, which is a barrier to use. It could probably be fudged to grab the credentials from the database and make it look as if they came from a file, but that’s a faff.
- The PHP SDK for sending email through SES is over 40MB. That’s twenty times the size of the Textpattern download itself!
- Bypassing the SDK to call the API directly means a tonne of hoops to jump through to obtain tokens and credentials and authenticate everything. Not insurmountable, but a lot of work.
- Many people won’t be using AWS, so to saddle the plugin with it seems over the top. It could be modularized of course, but still requires the base plugin to be aware of such modules and be able to handle handoff and responses accordingly.
Sadly, I don’t have the spare capacity to code that at the moment. If someone else does, that’s fantastic.
Last edited by Bloke (2024-05-19 08:12:14)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
#454 2024-05-20 06:52:21
- astick360
- Member
- Registered: 2022-05-05
- Posts: 23
Re: com_connect - form and contact mailer
Jakob, I don’t need integration, I just described what I have experience with AWS because someone asked above. Personally, I don’t quite see the need for Newssletter plugin in the CMS system. Prefers separate systems for this. Although there are probably applications where it can be useful, and if not, at least facilitating integration, e.g. after XML or Json. So that CMS can create a file with users with specific criteria and choose what fields from the user base to throw into the export file. Of course, such a file would have to be properly protected against unquestioned access or even sent cyclically or after changes to a specific email or after FTP, to update the newsleter database automatically or manually. In principle, this solution would not require frequent updates and would be very universal.
Offline
#455 2024-07-19 14:24:32
Re: com_connect - form and contact mailer
It appears that the default break
attribute produces <br />
ignoring the html5 Doctype preference of the site.
This parses the desirable html
<txp:com_connect_text name="LastName" label="Your surname" required="1" break="br" />
ie
<label for="Surname" class="comRequired">Your Surname:</label><br><input class="comRequired" id="Surname" name="Surname" type="text" maxlength="30" form="#####" required>
this does not
<txp:com_connect_text name="LastName" label="Your surname" required="1" />
notice the br
after the </label>
tag
<label for="Surname" class="comRequired">Your Surname:</label><br /><input class="comRequired" id="Surname" name="Surname" type="text" maxlength="30" form="#####" required>
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#456 2024-07-19 14:44:45
Re: com_connect - form and contact mailer
colak wrote #337422:
It appears that the default
break
attribute produces<br />
That’s interesting. It’s actually a core bug but we can’t do anything about it right now.
The problem is that the constant br
is defined in constants.php which is one of the first things to get included on every page load. That stupidly hard-codes the value to <br />
. The Prefs aren’t loaded until much later so at the time the constants are loaded, we don’t know which doctype is selected.
com_connect piggybacks off this by defining the default value of break
in most tags to the constant, hence it always outputs the XHTML version. Grrr.
I’ve just tried altering the plugin to set the default value to 'br'
instead of br
(without the quotes) because it’s supposed to detect the former situation and handle it by replacing the value with the correct line break sequence. But it doesn’t work, presumably because the attribute handler is short circuited and doesn’t think you’ve supplied any value, so it outputs the letters br verbatim.
More head scratching required.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online