html e-mail formular

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
Pappnase

html e-mail formular

Post by Pappnase »

hello

i have create an html e-mail form! so i would like to know if it's possible to send emails with this form via phpmailer. if yes how need i to include it!?
User avatar
Paradroid
Posts: 176
Joined: Fri 19. Mar 2004, 13:14
Location: Wuppertal
Contact:

Post by Paradroid »

Hi Pappnase,

this should be no problem. The formmailer proceeds all values set in a form an this should be independent from the creation of the form itself (form contentpart or self). You just have to set the action to the formmauler script. Like this :

Code: Select all

<form action="include/inc_act/act_formmailer.php" method="post" target = "_self">
Important to set the hidden values the script needs :

Code: Select all

<input type="hidden" name="subject" value="Kontaktaufnahme über Webseite" />
<input type="hidden" name="recipient" value="info@mydomain.de" />
<input type="hidden" name="type" value="1" />
I think the last one toggles the HTML Mail on/off.
You can also set the redirection URLs for success and error and
the language.
I didn't try this out, but it should work.

cu

Achim
ParaDroid

knquadrat edv + marketing
http://www.knquadrat.de

phpWCMS Dokumentation | Deutsch | English
eglwolf
Posts: 70
Joined: Mon 12. Apr 2004, 01:23

Post by eglwolf »

I added the following code to my site http://www.equivity.com/v4/ so I could have a quick comments area on my page. I have a couple of problems:

1) I orginally had the code below in a php file, so I could just include it on certain pages, but I received php include errors, so I have to add the code to the actual pages :-( Iwould rather have this as a seperate file and include it when and where I want it.

2) Second, once the form is submitted it takes you to the confirmation page, I would rather it just redirect back to the index page.

3) Is it possible to have the formmail send a copy of this to the sender?

4) In the email I receive the senders email is actually mine, how can I change that to the actually sender email, so that I can quickly reply to them.

Code: Select all

<table bgcolor="white" cellpadding="2" cellspacing="0" class="fblock" width="160">
<form action="include/inc_act/act_formmailer.php" method="post" target = "_self">
  <tr>
    <td width="100%" height="20">
    <img border="0" src="images/v4/questions.gif" width="157" height="16"></td>
  </tr>
  <tr>
    <td width="100%"  valign="center" align="center">
    <input type="text" name="name" value="Name" size="20"> 
<input type="text" name="recipient" value="your@yourdomain.com" size="20"> 
<textarea name="subject" value="Comments" rows="3" cols="15"> </textarea>
<input type="hidden" name="type" value="1">
<INPUT TYPE="image" SRC="images/v4/send.gif" width="39" height="9"  value="submit" align="right">

</td>
  </tr></form>
</table>
Pappnase

Post by Pappnase »

hello

thanks both for the hints! had anybody an idea hwo to create an attachment field!? i tryed one but only shows the link / path at the hdd :cry:
snobba
Posts: 166
Joined: Sat 6. Mar 2004, 12:41
Location: Sweden
Contact:

Post by snobba »

Correct me if I'm wrong but what I can see is that the formmail script in phpwcms has no uploading capacity at the moment..but I could be wrong...

Anyway, what you could do is create your own little script to post it to - see it here:

http://www.php.net/manual/en/features.file-upload.php

/ Martin
User avatar
Paradroid
Posts: 176
Joined: Fri 19. Mar 2004, 13:14
Location: Wuppertal
Contact:

Post by Paradroid »

eglwolf wrote:1) I orginally had the code below in a php file, so I could just include it on certain pages, but I received php include errors
Hmm, it would be nice to know the errors
eglwolf wrote:2) Second, once the form is submitted it takes you to the confirmation page, I would rather it just redirect back to the index page.
If you create your form in HTML you need to set the hidden values for redirection, for example :

Code: Select all

<input type="hidden" name="redirect" value="http://www.yourdomain.de/index.php?success" id="redirect" />
<input type="hidden" name="redirect_error" value="http://www.yourdomain.de/index.php?error" id="redirect_error" />
eglwolf wrote:3) Is it possible to have the formmail send a copy of this to the sender?
You have to set the hidden field "send_copy"

Code: Select all

<input type="hidden" name="send_copy" value="1" id="send_copy" />
You'll need a field called "email" in your form in order to work this properly.
eglwolf wrote:4) In the email I receive the senders email is actually mine, how can I change that to the actually sender email, so that I can quickly reply to them.
I don't know right now but i will take a look

cu

Achim
ParaDroid

knquadrat edv + marketing
http://www.knquadrat.de

phpWCMS Dokumentation | Deutsch | English
thomasB
Posts: 15
Joined: Wed 21. Apr 2004, 06:25

Post by thomasB »

Hello Achim,

is it possible to publish me the code for the form on knquadrat?
It seems to be exactly what i need.

Thank you in advance...

Thomas


_______________________

große Baustelle: http://www.moneywin.de :lol:

_______________________

@all sorry for my wonderfull fluent english, ha ha :shock:
User avatar
Paradroid
Posts: 176
Joined: Fri 19. Mar 2004, 13:14
Location: Wuppertal
Contact:

Post by Paradroid »

Here is the Code from the contact form on knquadrat.de :

Code: Select all

IT|name|1|Name:&nbsp;|40,100||300
IT|email|1|Email:&nbsp;|40,100||300
TA|info|1|Info:&nbsp;|30,10||300
IC|radio|0|Bitte um Rückmeldung&nbsp;|100,0|Per Telefon#Per E-Mail|0
IT|telefon|0|Telefon:&nbsp;|40,100||300
SM|menu|0|Wie haben Sie von uns erfahren&nbsp;|20,100|#Sonstiges#Anzeige#Empfehlung#Suchmaschine#Betreuungsforum#Banner auf Kundenseite|300
IH|language|0||10,100|DE|0
IH|redirect|0||10,100|http://www.knquadrat.de/index.php?success1|0
IH|redirect_error|0||10,100|http://www.knquadrat.de/index.php?error1|0
cu

Achim
ParaDroid

knquadrat edv + marketing
http://www.knquadrat.de

phpWCMS Dokumentation | Deutsch | English
thomasB
Posts: 15
Joined: Wed 21. Apr 2004, 06:25

Post by thomasB »

wonderfull, thank you very much!
I will try it!
Sorry for my late answer :-)

Regards,

Thomas :D
nsnook
Posts: 12
Joined: Fri 30. Apr 2004, 22:08

The "knquadrat.de" email form vs the HTML email f

Post by nsnook »

I created an email form & input the "knquadrat.de" code.... but I can not get it to work. What else do you do/add to make it actually email?

Do you use the formmailer?: "include/inc_act/act_formmailer.php"
nsnook
Posts: 12
Joined: Fri 30. Apr 2004, 22:08

What I can get to work...

Post by nsnook »

I can get the html emailer to work:
(but I still would like to use the other method, since it is so much cleaner)

<table bgcolor="white" cellpadding="2" cellspacing="0" class="fblock" width="160">
<form action="include/inc_act/act_formmailer.php" method="post" target = "_self">
<tr>
<td width="100%" height="20">
<img border="0" src="images/v4/questions.gif" width="157" height="16"></td>
</tr>
<tr>
<td width="100%" valign="center" align="center">
<input type="text" name="name" value="Name" size="20">
<input type="text" name="recipient" value="your@yourdomain.com" size="20">
<textarea name="subject" value="Comments" rows="3" cols="15"> </textarea>
<input type="hidden" name="type" value="1">
<INPUT TYPE="image" SRC="images/v4/send.gif" width="39" height="9" value="submit" align="right">

</td>
</tr></form>
</table>
eglwolf
Posts: 70
Joined: Mon 12. Apr 2004, 01:23

Post by eglwolf »

In getting ready to code this, I am wondering is there anykind of spam security prevention built into the formmail script so that spammers can't use these. Also how secure is it to have:

Code: Select all

<input type="hidden" name="recipient" value="info@mydomain.de" /> 
Viewable in the source? How can this be hidden from the source code?
eglwolf
Posts: 70
Joined: Mon 12. Apr 2004, 01:23

Post by eglwolf »

Also on my form this code:

Code: Select all

<input type="hidden" name="send_copy" value="1" id="send_copy" />
Does not seem to be working since the sender is not getting a copy of the email.
Post Reply