Page 1 of 1
html e-mail formular
Posted: Thu 29. Apr 2004, 06:02
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!?
Posted: Thu 29. Apr 2004, 09:27
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
Posted: Fri 30. Apr 2004, 18:02
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>
Posted: Fri 30. Apr 2004, 20:45
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
Posted: Fri 30. Apr 2004, 21:57
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
Posted: Sat 1. May 2004, 13:17
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
Posted: Mon 3. May 2004, 21:42
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
_______________________
@all sorry for my wonderfull fluent english, ha ha
Posted: Tue 4. May 2004, 08:33
by Paradroid
Here is the Code from the contact form on knquadrat.de :
Code: Select all
IT|name|1|Name: |40,100||300
IT|email|1|Email: |40,100||300
TA|info|1|Info: |30,10||300
IC|radio|0|Bitte um Rückmeldung |100,0|Per Telefon#Per E-Mail|0
IT|telefon|0|Telefon: |40,100||300
SM|menu|0|Wie haben Sie von uns erfahren |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
Posted: Fri 21. May 2004, 19:06
by thomasB
wonderfull, thank you very much!
I will try it!
Sorry for my late answer
Regards,
Thomas
The "knquadrat.de" email form vs the HTML email f
Posted: Sat 22. May 2004, 10:30
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"
What I can get to work...
Posted: Sat 22. May 2004, 10:31
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>
Posted: Wed 2. Jun 2004, 07:06
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?
Posted: Wed 2. Jun 2004, 18:22
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.