WebSite X5Help Center

 
Bernard L.
Bernard L.
User

Email Form  en

Autor: Bernard L.
Besucht 3224, Followers 2, Geteilt 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.

Gepostet am
7 ANTWORTEN - 1 KORREKT
Bernard L.
Bernard L.
User
Autor

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"

Mehr lesen
Gepostet am von 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.

Mehr lesen
Gepostet am von Luca S.
Bernard L.
Bernard L.
User
Autor

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.

Mehr lesen
Gepostet am von Bernard L.
Bernard L.
Bernard L.
User
Autor

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

Mehr lesen
Gepostet am von 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.

Mehr lesen
Gepostet am von Luca S.
Bernard L.
Bernard L.
User
Autor

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.

Mehr lesen
Gepostet am von Bernard L.