Sotto Sopra Posted October 14, 2022 Share Posted October 14, 2022 I have a problem with the module contact form. Every time i send a message appear the error message "An error occurred while sending the message." but the message is sended correctly. If i recharge the page i see the allert tha the message is sent correctly and if i go to the BO i could see all the message. I used the file of the classic theme because my customed theme didn't work. this is my code: <section class="contact-form"> <form action="{$urls.pages.contact}" method="post" {if $contact.allow_file_upload}enctype="multipart/form-data"{/if}> {if $notifications} <div class="col-xs-12 alert {if $notifications.nw_error}alert-danger{else}alert-success{/if}"> <ul> {foreach $notifications.messages as $notif} <li>{$notif}</li> {/foreach} </ul> </div> {/if} {if !$notifications || $notifications.nw_error} <section class="form-fields"> <div class="form-group row"> <div class="col-md-9 col-md-offset-3"> <h3>{l s='Contact us' d='Shop.Theme.Global'}</h3> </div> </div> <div class="form-group row"> <label class="col-md-3 form-control-label">{l s='Subject' d='Shop.Forms.Labels'}</label> <div class="col-md-6"> <select name="id_contact" class="form-control form-control-select"> {foreach from=$contact.contacts item=contact_elt} <option value="{$contact_elt.id_contact}">{$contact_elt.name}</option> {/foreach} </select> </div> </div> <div class="form-group row"> <label class="col-md-3 form-control-label">{l s='Email address' d='Shop.Forms.Labels'}</label> <div class="col-md-6"> <input class="form-control" name="from" type="email" value="{$contact.email}" placeholder="{l s='[email protected]' d='Shop.Forms.Help'}"> </div> </div> {if $contact.allow_file_upload} <div class="form-group row"> <label class="col-md-3 form-control-label">{l s='Attachment' d='Shop.Forms.Labels'}</label> <div class="col-md-6"> <input type="file" name="fileUpload" class="filestyle" data-buttonText="{l s='Choose file' d='Shop.Theme.Actions'}"> </div> <span class="col-md-3 form-control-comment"> {l s='optional' d='Shop.Forms.Help'} </span> </div> {/if} <div class="form-group row"> <label class="col-md-3 form-control-label">{l s='Message' d='Shop.Forms.Labels'}</label> <div class="col-md-9"> <textarea class="form-control" name="message" placeholder="{l s='How can we help?' d='Shop.Forms.Help'}" rows="3" >{if $contact.message}{$contact.message}{/if}</textarea> </div> </div> {if isset($id_module)} <div class="form-group row"> <div class="offset-md-3"> {hook h='displayGDPRConsent' id_module=$id_module} </div> </div> {/if} </section> <footer class="form-footer text-sm-right"> <style> input[name=url] { display: none !important; } </style> <input type="text" name="url" value=""/> <input type="hidden" name="token" value="{$token}" /> <input class="btn btn-primary" type="submit" name="submitMessage" value="{l s='Send' d='Shop.Theme.Actions'}"> </footer> {/if} </form> </section> Link to comment Share on other sites More sharing options...
Nickz Posted October 15, 2022 Share Posted October 15, 2022 since when and is your shop online or hosted localy? Link to comment Share on other sites More sharing options...
Sotto Sopra Posted October 15, 2022 Author Share Posted October 15, 2022 I only try yesterday the module and my site is online with a web hosting Link to comment Share on other sites More sharing options...
Nickz Posted October 15, 2022 Share Posted October 15, 2022 6 hours ago, Sotto Sopra said: I only try yesterday the module and my site is online with a web hosting Ok did you set um the smpt server for your site? What are the Specs of that server? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now