Adobe Dreamweaver Forums



Last 10 THreads :         Re: Unloading SWFLoader... BUG??! (Last Post : LuigiL - Replies : 1 - Views : 2 )           »          Problem with navigateToURL to a certain frame (Last Post : Ibsie - Replies : 0 - Views : 1 )           »          html view - how to wrap the text (Last Post : lmckh - Replies : 1 - Views : 2 )           »          Help! Prob with CSS display (Last Post : hnajskmei - Replies : 0 - Views : 1 )           »          DW help urgently needed, lost my connection to site (Last Post : Ronnie MacGregor - Replies : 11 - Views : 12 )           »          Connecting to a Database (Last Post : Ronnie MacGregor - Replies : 11 - Views : 12 )           »          application.cfm/webservice (Last Post : BKBK - Replies : 1 - Views : 2 )           »          Random positions for Movieclips (Last Post : arnhemcs - Replies : 4 - Views : 8 )           »          Generating LEGAL size Word doc (Last Post : BKBK - Replies : 2 - Views : 3 )           »          This Tough Economy and Flex/AIR (Last Post : LuigiL - Replies : 2 - Views : 109 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Dreamweaver: Main > Dreamweaver General
 
Tags: , ,



Reply
  #11 (permalink)  
Old 09-04-2008, 12:28 PM
Murray *ACE*
 
Posts: n/a
Diggs:
Default Re: PHP Email Setup

And, it makes your server an open relay for email spam.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"malcster2" <webforumsuser@macromedia.com> wrote in message
news:g9o7tn$ij1$1@forums.macromedia.com...
> daniel, this works for me
>
> <?php
>
>
> if(isset($_POST['submit']))
> {
> $varbreak = "\n\n";
>
> mail('contact@youremailaddress', 'Subject: '.$_POST['subject'],
> $_POST['message'].$varbreak.$_POST['name'], $_POST['email']);
> unset($_POST['submit']);
>
> }
>
> ?>
>
> all you have got to do is set a form with the relevant id's, ie, subject,
> message, name and email
>


Reply With Quote
Sponsored Links
  #12 (permalink)  
Old 09-04-2008, 01:15 PM
Murray *ACE*
 
Posts: n/a
Diggs:
Default Re: PHP Email Setup

The concern is NOT spam on your email. It's that you are not preventing
email injection attacks with your simplistic approach.

http://www.nyphp.org/phundamentals/e..._injection.php

Approaches such as yours are responsible for some significant percentage of
spam email....

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"malcster2" <webforumsuser@macromedia.com> wrote in message
news:g9ohf2$s0o$1@forums.macromedia.com...
> i've had this for ages, had no spam on it yet.
>
> so what is the problem with this method?
> would you not use the mail(....) function?
>
> or is it because there is an email in the code?
>
> i actually have any mail for this address redirected to my hotmail, so
> that
> filters out any spam anyway.
>


Reply With Quote


  #13 (permalink)  
Old 09-04-2008, 01:15 PM
malcster2
 
Posts: n/a
Diggs:
Default Re: PHP Email Setup

i've had this for ages, had no spam on it yet.

so what is the problem with this method?
would you not use the mail(....) function?

or is it because there is an email in the code?

i actually have any mail for this address redirected to my hotmail, so that
filters out any spam anyway.

Reply With Quote
  #14 (permalink)  
Old 09-04-2008, 01:41 PM
malcster2
 
Posts: n/a
Diggs:
Default Re: PHP Email Setup

ha!

i thought it was to easy!!

thanks murray.

note: i just don't understand why spam is not just made illegal, across the
world, and all hackers/geeks are not stuck on a small, preferbly smelly island
somewhere!

Reply With Quote
  #15 (permalink)  
Old 09-04-2008, 02:25 PM
Murray *ACE*
 
Posts: n/a
Diggs:
Default Re: PHP Email Setup

> i just don't understand why spam is not just made illegal

It is already. Try to catch one....

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"malcster2" <webforumsuser@macromedia.com> wrote in message
news:g9oji2$106$1@forums.macromedia.com...
> ha!
>
> i thought it was to easy!!
>
> thanks murray.
>
> note: i just don't understand why spam is not just made illegal, across
> the
> world, and all hackers/geeks are not stuck on a small, preferbly smelly
> island
> somewhere!
>


Reply With Quote


  #16 (permalink)  
Old 09-04-2008, 08:15 PM
Michael Fesser
 
Posts: n/a
Diggs:
Default Re: PHP Email Setup

.oO(malcster2)

>i've had this for ages, had no spam on it yet.
>
> so what is the problem with this method?
> would you not use the mail(....) function?


Using something like PHPMailer is safer and much more convenient. It
takes care of a lot of problems (not all, though) that may make your
application unreliable or even vulnerable. It's not only about header
injection, but also about correct header delimiters for example (\n\n is
not RFC-compliant). Not to mention the trouble you might run into if you
want to build correct multi-part messages just with mail() ...

Micha
Reply With Quote
  #17 (permalink)  
Old 09-15-2008, 10:00 PM
daniel@golombgroup.com
 
Posts: n/a
Diggs:
Default Re: PHP Email Setup

Hey, Thanks for all the replys, I appreciate the help.
I did eventually get the form up and running with the help of a tutor.

There are 2 parts to the form code:

Now my working form looks like this:

<form method="post" action="">
<INPUT type=text name="realname" id="name-input" value="Your
Name" size="74" style="font-family: tahoma; font-size: 11px;color:#848484;
background-color:#FFFFFF; margin-left:22px; margin-top:10px;">
<INPUT type=text name="emailaddress" id="email-input" value="Your
E-mail Address" size="74" style="font-family: tahoma; font-size:
11px;color:#848484; background-color:#FFFFFF; margin-left:22px;
margin-top:4px;">
<TEXTAREA name="message" id="message-input"
style="margin-left:22px; font-family:Tahoma; font-size:11px;
margin-bottom:10px; margin-top:4px; color:#848484; background-color:#FFFFFF;
overflow:hidden; " rows=3 cols=71 >Type Your Message Here</TEXTAREA>
<div style="font-family:Tahoma; font-size:10px; color:#0086AF;
font-weight:bold; margin-left:290px;">
<input type="reset" name="Reset" id="button" value="Reset">
<input type="submit" name="button2" id="button2" value="Submit">
</div>
</form>

And there is also this code:

<?
if($_REQUEST[message]){ //This checks if the form has been submitted or not
$to="info@mysite.com"; // Modify the email address to be the email address
you want to receive the email via your form.
$from=$_REQUEST[emailaddress]; // The from variable is set by the form field
that was sent
$realname=$_REQUEST[realname];
$subject="Contact From Your Website"; // This is the subject of the message
being sent to you from your form
$message="Name: ".$_REQUEST[realname]."\n\n"."Email Address:
".$from."\n\n"."Message: ".$_REQUEST[message]; // This is the message to be
sent to you
mail($to,$subject,$message); // This is the actual sending of the email
using PHP's mail function http://us.php.net/manual/en/function.mail.php
$confirmto=$_REQUEST[emailaddress]; // The email address we'll send a
confirmation to
$confirmsubject="Your Confirmation"; // Confirmation Email Subject
$confirmfrom="noreply@mysite.com"; // Your confirming emailer address
$confirmmessage="Thank you for your email."; // Message to send to confirm
//mail($confirmto,$confirmsubject,$confirmmessage) ; // Confirmation -
uncomment this line to use it
//After the message is sent we will display a thank you message
?>
Thank you... Your message has been sent.

<? } else { // If the form has not been submitted show the form ?>

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 12:51 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk