WebSite X5Help Center

 
Bernard L.
Bernard L.
User

Email Form  en

Author: Bernard L.
Visited 3083, Followers 2, Shared 37  
Tags: email,form,mail

There's a "bug" when one creates an email form, the form action calls action="mail/imEmailForm.php"

So it results in a http://www.viandesg.com/mail/imEmailForm.php

on my server, /mail is a shortcut for a webmail application and therefore the action result in a "Page not found" message as the imEmailForm.php file does not exist in the mail folder of my server. To me the action should be relative to the html docs. See the picture with my server tree.

Posted on the
7 ANSWERS - 1 CORRECT
Bernard L.
Bernard L.
User
Author

A workaround until someone comes with an other answer:

rename the mail/imEmailForm.php

to email/imEmailForm.php

Open the html file where you have your contact form and in the form action, change the

action="mail/imEmailForm.php"

to

action="email/imEmailForm.php"

Read more
Posted on the from Bernard L.
Luca S.
Luca S.
User

Hello Bernard,

Alternativelyyou could try tocreate atop level folderto the folder"html"and exportall your projectinone new folder level. In this mode you have the path on /var/www/html/newfolder/mail/ and mail is not a folder of webmail.

Read more
Posted on the from Luca S.
Bernard L.
Bernard L.
User
Author

Thank you but that won't work.   "/mail" is global shortcut to the webmail application, just typewww.viandesg.com/mailand you will see. This shortcut is on all my websites hosted on Jumpline and the tech support say that they won't/can't change it as it is in the apache setup.

Read more
Posted on the from Bernard L.
Bernard L.
Bernard L.
User
Author

Does not wort either.

my site is in: /var/www/html

therefore the mail is in /var/www/html/mail

the webmail application is in: /usr/webapps/webmail

so there should not be any problem but on the server, there is a folder called mail that is located at: /var/spool/mail

so whenever someone types or request through a script something inside the /mail folder, the server defaults to te above and issues a 404

Read more
Posted on the from Bernard L.
Luca S.
Luca S.
User

Hello Bernard,

We cannotchange theexport folderwith anothername becausethe problemcould happen inany case for another web server.Iunderstandthat yourproviderhas set upa linkthat redirectsmailapplication on path /usr/webapps/webmail/.It is possibleby the server thatmanagesyour web spacetochange thislink butyou should contact theserver administratorto make thesechanges.

Read more
Posted on the from Luca S.
Bernard L.
Bernard L.
User
Author

Thank you for your help, I will edit the html page every time I upload the site to match a new folder I created and where I put the php script that sends the mail.

Read more
Posted on the from Bernard L.