Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#337 2021-11-13 06:42:43

hildebruns
Member
Registered: 2009-03-10
Posts: 30

Re: com_connect - form and contact mailer

Hello,
I have com_connect with ext_file_attach. If I attach a file, a blank message will be sent with only the attachment. If I do not attach a file all fields are displayed in the message.

If I try to format my email via “body_form”, an empty email is also sent.

Instaled Textpattern 4.8.7. with PHP 7.4.23.

Does anyone have an idea? Unfortunately I don’t speak PHP;).
Thank you

Offline

#338 2021-11-13 06:55:31

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,794
Website GitHub Twitter

Re: com_connect - form and contact mailer

hildebruns wrote #331939:

Hello,
I have com_connect with ext_file_attach. If I attach a file, a blank message will be sent with only the attachment. If I do not attach a file all fields are displayed in the message.

If I try to format my email via “body_form”, an empty email is also sent.

Instaled Textpattern 4.8.7. with PHP 7.4.23.

Does anyone have an idea? Unfortunately I don’t speak PHP;).
Thank you

Could you post the tags you are using? ext_file_attach works fine on my install.

Edited to remind you to anonymise your email before posting the tags here.

Last edited by colak (2021-11-13 06:58:08)


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#339 2021-11-13 08:14:26

hildebruns
Member
Registered: 2009-03-10
Posts: 30

Re: com_connect - form and contact mailer

Hi,

Formatting with “body_form” now works fine.
But when I attach a file, the message is blank but the attachment is sent.
Without an attachment, everything works as expected.

Form:

<txp:com_connect to='antrag@xxx.de/' from='noreply@xxx.de' label="" expire="2400" redirect='danke-landing' copysender="1" subject='Bereich <txp:section/>'  body_form="test_file_mail_mail" >                     
    <div class="">                                                                                                                                                                                                                    
        <txp:com_connect_text type="text" break="" class="form-input" label="Vorname:*" placeholder="Vorname" name="vorname"/>                                                                                                        
    </div>                                                                                                                                                                                                                            
    <div class="">                                                                                                                                                                                                                    
        <txp:com_connect_text type="text" break="" class="form-input" label="Nachname:*" placeholder="Nachname" name="nachname"/>                                                                                                     
    </div>                                                                                                                                                                                                                            
    <div class="">                                                                                                                                                                                                                    
        <txp:com_connect_email break="" class="form-input" label="E-Mail:*" placeholder="E-Mail" name="email"/>                                                                                                                       
    </div>                                                                                                                                                                                                                            
    <div>                                                                                                                                                                                                                             
        <txp:com_connect_file required="0"  label="File" />                                                                                                                                                                           
    </div>                                                                                                                                                                                                                            
    <div class="btn-group mt-2 mb-2">                                                                                                                                                                                                 
        <txp:com_connect_submit label="Abschicken" class="btn btn-primary" style="border:none;"/>                                                                                                                                     
    </div>                                                                                                                                                                                                                            
</txp:com_connect>   

Mail form:

============
Email received.
<txp:com_connect_value name="vorname" />
<txp:com_connect_value name="nachname" />
<txp:com_connect_value name="email" />
============

Offline

#340 2021-11-13 09:34:57

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,794
Website GitHub Twitter

Re: com_connect - form and contact mailer

What happens if you change <txp:com_connect_file required="0" label="File" /> to <txp:com_connect_file label="File" max="2000000" accept=".pdf,.docx,.doc,.txt,.rtf" required="0" />?

You can of course change the accepted extensions.

Also… try without the body_form.


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#341 2021-11-13 09:48:12

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,794
Website GitHub Twitter

Re: com_connect - form and contact mailer

In fact, there are some single quotes that need to be double ones there. try

<txp:com_connect to="antrag@xxx.de/" from="noreply@xxx.de" label="" expire="2400" redirect="danke-landing" copysender="1" subject="Bereich <txp:section/>">                     
    <div class="">                                                                                                                                                                                                                    
        <txp:com_connect_text type="text" break="" class="form-input" label="Vorname:*" placeholder="Vorname" name="vorname"/>                                                                                                        
    </div>                                                                                                                                                                                                                            
    <div class="">                                                                                                                                                                                                                    
        <txp:com_connect_text type="text" break="" class="form-input" label="Nachname:*" placeholder="Nachname" name="nachname"/>                                                                                                     
    </div>                                                                                                                                                                                                                            
    <div class="">                                                                                                                                                                                                                    
        <txp:com_connect_email break="" class="form-input" label="E-Mail:*" placeholder="E-Mail" name="email"/>                                                                                                                       
    </div>                                                                                                                                                                                                                            
    <div>                                                                                                                                                                                                                             
        <txp:com_connect_file label="File" max="2000000" accept=".pdf,.docx,.doc,.txt,.rtf" required="0" />                                                                                                                                                                       
    </div>                                                                                                                                                                                                                            
    <div class="btn-group mt-2 mb-2">                                                                                                                                                                                                 
        <txp:com_connect_submit label="Abschicken" class="btn btn-primary" style="border:none;"/>                                                                                                                                     
    </div>                                                                                                                                                                                                                            
</txp:com_connect>

Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#342 2021-11-14 07:28:48

hildebruns
Member
Registered: 2009-03-10
Posts: 30

Re: com_connect - form and contact mailer

Thank you Colak,

now it works.

Is it actually possible to send a different mail to the sender than to the admin?
In addition to the “body_form”, there is also a “sender_form”. That would make sense, especially with larger forms.
If the admin needs all the information but the sender only needs the confirmation.

Thanks

Offline

#343 2021-11-16 06:41:19

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,794
Website GitHub Twitter

Re: com_connect - form and contact mailer

hildebruns wrote #331951:

Thank you Colak,

now it works.

Is it actually possible to send a different mail to the sender than to the admin?
In addition to the “body_form”, there is also a “sender_form”. That would make sense, especially with larger forms.
If the admin needs all the information but the sender only needs the confirmation.

Thanks

I’m sorry I can not help you on this, but I’m bumping this thread as someone with more knowledge may.


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB