Important announcements from CouchCMS team
20 posts Page 2 of 2
KK wrote: The following line needs "double-quotes" while setting the 'file' parameter -
Code: Select all
<cms:attachment file='<cms:securefile_link file_id />' />

Please see https://docs.couchcms.com/concepts/sett ... eters.html for why the type of quotes matters.


Wow! Something so simple.. Thanks a million..
I haven't used PHPmailer library with the Couch. I personally don't like this PHP library. There are a lot of other PHP libraries for mailing, like Swiftmailer.
coduster wrote: I haven't used PHPmailer library with the Couch. I personally don't like this PHP library. There are a lot of other PHP libraries for mailing, like Swiftmailer.

Swift Mailer requires PHP 7.0 or higher
Have anybody used SMTP API or Email API to send mail?

Please help setting up how to send mail using SMTP API or Email API (Gmail or Sendinblue or any) because my hosting provider has blocked all the SMTP port.

Thank you in advance.
Sendinblue (and I am sure others similar providers too) provide their own client scripts to communicate easily with their APIs e.g the following is for PHP -
https://github.com/sendinblue/APIv3-php-library

You'll need to use that to work with their APIs.

Hope this helps.
Hello,
Sorry for reactivating an ancient thread :)

Is it possible to send multiple attachment via this method? I figured out how to enable multiple selection for the field itself, but it still only sends 1 file.

Code: Select all
<div class="uni-formfield-container">
            <label for="heroform_estimate" class="filebutton-label">
                <span>+</span>
                Załącz kosztorys szkody
            </label>
            <cms:input type='uploadfile' name='my_file_ex' id="heroform_estimate" class="d-none" required='1' allowed_ext='jpeg,jpg,gif,png,txt,pdf' max_size='2048' multiple="multiple" />
        </div>


Code: Select all
<cms:if k_success >      
        <cms:send_mail from='contactform@universal-odszkodowania.pl' to='<cms:show recipient_mail />' reply_to=frm_email subject='Nowe zgloszenie ze strony Universal-Odszkodowania'>
            <cms:show my_message />           
            <cms:attachment field='my_file_ex' />
        </cms:send_mail>(...)


Thank you in advance!
@theV. Hi!

Type 'uploadfile' (exactly like its cousin 'securefile') supports only a single file per field.
So, to have multiple attachments, you'll have to use multiple fields.

Perhaps you may try defining the maximum number practically possible e.g. 5 regions, show only one to begin with and have a button 'Add' that uses JS to reveal additional region at each click?

Hope this helps.
KK wrote: @theV. Hi!

Type 'uploadfile' (exactly like its cousin 'securefile') supports only a single file per field.
So, to have multiple attachments, you'll have to use multiple fields.

Perhaps you may try defining the maximum number practically possible e.g. 5 regions, show only one to begin with and have a button 'Add' that uses JS to reveal additional region at each click?

Hope this helps.

I see, thanks!
Does the same restriction apply to the Emailex extension?
Does the same restriction apply to the Emailex extension?

Hmm.. I checked and, prima fascie, it appears that the Emailex extension is not tied to specific regions; rather it just checks for the attachments regardless of their numbers.

Well, so it might very well work :) Please give it a try and let us know if it does.
Wow! So far I have been using a custom phpmailer solution (cos I wanted a nice branded email summary send to the custimer AND a plaintext version for the site owner AND some customization), which the origibal couch form could not do ... but on a quick glance, this looks super AND is a couch native. Definitely going to try, big thanks, KK!
20 posts Page 2 of 2