Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: com_connect - form and contact mailer
Bloke wrote #313989:
Restricting file uploads? What are you, Axel Voss? ?
You can use the
accept
attribute but it’ll only offer users a filter for those types – they can still use “All files” from the native file picker so you’ll need to sanitize the file extensions or (better) MIME type programmatically on reception.Drat, what is causing that? It always seems to work when I try it. Must be something I’m missing with some server setups or I’m just making an assumption in the code that is causing it to fall over. Annoying.
I can give you access to my site if you want to test it in another environment… I think you have one… unless of course you forgot your pw.
> Edited to add that I am testing it by having the tag wrapped in the <txp:if_logged_in>
tag.
Last edited by colak (2018-09-13 12:17:49)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: com_connect - form and contact mailer
colak wrote #313991:
I can give you access to my site if you want to test it in another environment
Thanks, I’ve logged in.
Incidentally, how to use the accept
attribute: stackoverflow.com/a/23706177
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
Offline
Re: com_connect - form and contact mailer
Bloke wrote #313995:
after a quick test, trying to send a small 18Kb jpg, returned the error
Send file must not exceed 8000000.
.
On my own server, I’ve cloned your contact form (changed only the to
address) and it successfully sent me a 128KB Word doc, except my email program thought it was 0 bytes long. Looking at the raw message, the entire mail and attachment are there, encoded, so I guess the headers or boundary tags are screwed up a bit which means mail programs get the wrong info.
When I’ve debugged that so I can successfully receive an email with an attachment, I’ll transfer that plugin to your site and then see if I can replicate the erroneous ‘exceeded file size’ issue there.
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
Offline
#100 2018-09-13 14:21:23
Re: com_connect - form and contact mailer
Yiannis, try that. I’ve sent a test file and it went through.
I’ll issue a new release imminently.
Note to self: don’t assume jQuery is loaded on the public site.
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
Offline
#101 2018-09-13 15:47:33
Re: com_connect - form and contact mailer
hey magic keyboard… Whatever you did, it is working now. Thanks so much!
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#102 2018-09-13 15:54:13
Re: com_connect - form and contact mailer
colak wrote #314003:
hey magic keyboard… Whatever you did, it is working now!
:) Cool. If you want the official version, including correct version number and docs, then download it and install it over your hacked copy.
It was simply not submitting the file at all because the jQuery code I’d used to inject the multipart/form-data
wasn’t running if you didn’t load jQuery on the public site. Stupid/lazy assumption on my part. Then, the check for “is file size correct” also did a check for “is there a file at all” and when it couldn’t find the file, threw the (incorrect) message which was what confused everybody.
jQuery is no longer a requirement as it does the injection via raw JavaScript. With the latest version of the com_connect plugin it might be able to be done via a callback, but I can’t remember how flexible I made it. I’ll check one day. Just checked: the callback is only for inserting additional form elements into the <form>
body not for injecting header attributes. Bah!
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
Offline
#103 2018-09-13 18:05:02
Re: com_connect - form and contact mailer
Bloke wrote #314004:
:) Cool. If you want the official version, including correct version number and docs, then download it and install it over your hacked copy.
just installed the official one…. I’ll be checking it tomorrow as my brain is currently mushy after a long day on the CAD programme.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#104 2018-09-14 08:48:30
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
Re: com_connect - form and contact mailer
Bloke wrote #314004:
:) Cool. If you want the official version, including correct version number and docs, then download it and install it.
juhhuu! it’s working now! tnx, stef!
Offline
#105 2018-09-24 08:22:16
- alexwest
- Member
- From: Järna, Sweden
- Registered: 2004-08-04
- Posts: 53
Re: com_connect - form and contact mailer
Hi,
I have set up the com_connect plugin in a website that was built some 6 years ago, replacing zem_contact. There are no issues with the transition but…
Although the plugin ”seems” to successfully send out the messages through the forms I have in the website it does not arrive at the email account I have provided for it.
Any thoughts on what I might look for to solve this?
be safe and happy
Offline
#106 2018-09-24 14:49:46
Re: com_connect - form and contact mailer
@alexwest, what provider are you sending the messages to? Is it gmail or hotmail or other online provider? Sometimes they (erroneously) decide messages are spam, but instead of delivering them with a mark and letting the recipient decide, they take it upon themselves to bin them without you even knowing.
There is also the SMTP envelope sender address in Prefs that can be used to help in these situations.
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
Offline
#107 2018-09-25 10:46:22
- alexwest
- Member
- From: Järna, Sweden
- Registered: 2004-08-04
- Posts: 53
Re: com_connect - form and contact mailer
@Bloke, thanks for prompt reply. I have tried setting the SMTP option in Prefs as you suggest. The strange thing is, if I use my own gmail account with the SMTP option in Prefs set, it works fine. With an email from the same domain as the one the website is created in it does not, one way or the other. Would I guess correctly that the domain’s webmail server is sorting these messages out? I don’t see them in any other folder, neither bin or spam…
Anyways, I have a working solution for now so I’ll go with that.
be safe and happy
Offline
#108 2018-09-25 14:56:39
Re: com_connect - form and contact mailer
alexwest wrote #314162:
The strange thing is, if I use my own gmail account with the SMTP option in Prefs set, it works fine. With an email from the same domain as the one the website is created in it does not, one way or the other.
There might be a Sender Policy Framework directive on the domain at a DNS level that prevents delivery – check name servers for the domain and see if there’s a TXT
record for SPF
.
Offline