Connecting Tech Pros Worldwide Forums | Help | Site Map

Can anyone see a problem with this email script?

Pete Marsh
Guest
 
Posts: n/a
#1: Apr 9 '07
Wondering if anyone can see an error with this script. I get a server
configuration error. THat could mean a module is not being loaded, but
maybe there's a syntax error here, can anyone spot it? Thanks

<?

Error_Reporting(E_ALL & ~E_NOTICE);
$subject="from ".$_REQUEST['Your_Name:'] ;
$headers= "From: ".$_REQUEST['Your_Email:'] ."\n";
$headers.='Content-type: text/html; charset=iso-8859-1';
$message='';
while ($field = current($_REQUEST)) {
if ((key($_REQUEST)!="Your_Name:") && (key($_REQUEST)!
="Your_Email:") && (key($_REQUEST)!="Message:") && (key($_REQUEST)!
="i")) {
$message.="<strong>".key($_REQUEST)."</strong>&nbsp;&nbsp;&nbsp;".
$field."<br>";
}
next($_REQUEST);
}
$message.="<br>".$_REQUEST['Message:'];
mail($_REQUEST['recipient'], $subject, "
<html>
<head>
<title>Contact letter</title>
</head>
<body>
<br>
".$message."
</body>
</html>" , $headers);
echo ("Your message was successfully sent!");

?>


Rami Elomaa
Guest
 
Posts: n/a
#2: Apr 9 '07

re: Can anyone see a problem with this email script?


Pete Marsh kirjoitti:
Quote:
Wondering if anyone can see an error with this script. I get a server
configuration error. THat could mean a module is not being loaded, but
maybe there's a syntax error here, can anyone spot it? Thanks
>
<?
>
Error_Reporting(E_ALL & ~E_NOTICE);
$subject="from ".$_REQUEST['Your_Name:'] ;
$headers= "From: ".$_REQUEST['Your_Email:'] ."\n";
$headers.='Content-type: text/html; charset=iso-8859-1';
$message='';
while ($field = current($_REQUEST)) {
if ((key($_REQUEST)!="Your_Name:") && (key($_REQUEST)!
="Your_Email:") && (key($_REQUEST)!="Message:") && (key($_REQUEST)!
="i")) {
$message.="<strong>".key($_REQUEST)."</strong>&nbsp;&nbsp;&nbsp;".
$field."<br>";
}
next($_REQUEST);
}
$message.="<br>".$_REQUEST['Message:'];
mail($_REQUEST['recipient'], $subject, "
<html>
<head>
<title>Contact letter</title>
</head>
<body>
<br>
".$message."
</body>
</html>" , $headers);
echo ("Your message was successfully sent!");
>
?>
>
Have you tried with the very simplest possible mail? I mean just leave
out all the form shit and custom headers and such and just try:

mail('your_email@example.com','this is a test', 'Hello Kitty!');

And if you get a server configuration error with that, then it's not a
php problem, it's a configuration problem. If not, you can slowly start
adding the stuff you have above to your mail and then see where it goes
wrong.

BTW. It's not against the law or anything to have colons in field names,
but just to be on the safe side, I wouldn't use them. They serve no
purpouse and it's just not customary to do so. I actually had to test to
see if they really really work, and yes they do, but it's still quite
odd to do so. I was thinking the old "dots are converted to undescores"
trick...

--
Rami.Elomaa@gmail.com
"Olemme apinoiden planeetalla."
Pete Marsh
Guest
 
Posts: n/a
#3: Apr 10 '07

re: Can anyone see a problem with this email script?


On Apr 9, 2:34 pm, Rami Elomaa <rami.elo...@gmail.comwrote:
Quote:
Pete Marsh kirjoitti:
>
>
>
Quote:
Wondering if anyone can see an error with this script. I get a server
configuration error. THat could mean a module is not being loaded, but
maybe there's a syntax error here, can anyone spot it? Thanks
>
Quote:
<?
>
Quote:
Error_Reporting(E_ALL & ~E_NOTICE);
$subject="from ".$_REQUEST['Your_Name:'] ;
$headers= "From: ".$_REQUEST['Your_Email:'] ."\n";
$headers.='Content-type: text/html; charset=iso-8859-1';
$message='';
while ($field = current($_REQUEST)) {
if ((key($_REQUEST)!="Your_Name:") && (key($_REQUEST)!
="Your_Email:") && (key($_REQUEST)!="Message:") && (key($_REQUEST)!
="i")) {
$message.="<strong>".key($_REQUEST)."</strong>&nbsp;&nbsp;&nbsp;".
$field."<br>";
}
next($_REQUEST);
}
$message.="<br>".$_REQUEST['Message:'];
mail($_REQUEST['recipient'], $subject, "
<html>
<head>
<title>Contact letter</title>
</head>
<body>
<br>
".$message."
</body>
</html>" , $headers);
echo ("Your message was successfully sent!");
>
Quote:
?>
>
Have you tried with the very simplest possible mail? I mean just leave
out all the form shit and custom headers and such and just try:
>
mail('your_em...@example.com','this is a test', 'Hello Kitty!');
>
And if you get a server configuration error with that, then it's not a
php problem, it's a configuration problem. If not, you can slowly start
adding the stuff you have above to your mail and then see where it goes
wrong.
>
BTW. It's not against the law or anything to have colons in field names,
but just to be on the safe side, I wouldn't use them. They serve no
purpouse and it's just not customary to do so. I actually had to test to
see if they really really work, and yes they do, but it's still quite
odd to do so. I was thinking the old "dots are converted to undescores"
trick...
>
--
Rami.Elo...@gmail.com
"Olemme apinoiden planeetalla."


hi yes your basic mail works, so it's something else.
it's a very weird set up I've inherited. They have the actual form
separated out and embeded in a flash app, so I can't even see it! Then
they ahve two separate php scripts, one to handle the form processing,
and this one to handle to email respone. but the form processor does
not seem to point to this email script. What a mess.

Rami Elomaa
Guest
 
Posts: n/a
#4: Apr 10 '07

re: Can anyone see a problem with this email script?


Pete Marsh kirjoitti:
Quote:
On Apr 9, 2:34 pm, Rami Elomaa <rami.elo...@gmail.comwrote:
Quote:
>Pete Marsh kirjoitti:
>>
>>
>>
Quote:
>>Wondering if anyone can see an error with this script. I get a server
>>configuration error. THat could mean a module is not being loaded, but
>>maybe there's a syntax error here, can anyone spot it? Thanks
>><?
>>Error_Reporting(E_ALL & ~E_NOTICE);
>>$subject="from ".$_REQUEST['Your_Name:'] ;
>>$headers= "From: ".$_REQUEST['Your_Email:'] ."\n";
>> $headers.='Content-type: text/html; charset=iso-8859-1';
>> $message='';
>> while ($field = current($_REQUEST)) {
>> if ((key($_REQUEST)!="Your_Name:") && (key($_REQUEST)!
>>="Your_Email:") && (key($_REQUEST)!="Message:") && (key($_REQUEST)!
>>="i")) {
>> $message.="<strong>".key($_REQUEST)."</strong>&nbsp;&nbsp;&nbsp;".
>>$field."<br>";
>> }
>> next($_REQUEST);
>> }
>>$message.="<br>".$_REQUEST['Message:'];
>>mail($_REQUEST['recipient'], $subject, "
>><html>
>><head>
>> <title>Contact letter</title>
>></head>
>><body>
>><br>
>> ".$message."
>></body>
>></html>" , $headers);
>>echo ("Your message was successfully sent!");
>>?>
>Have you tried with the very simplest possible mail? I mean just leave
>out all the form shit and custom headers and such and just try:
>>
>mail('your_em...@example.com','this is a test', 'Hello Kitty!');
>>
>And if you get a server configuration error with that, then it's not a
>php problem, it's a configuration problem. If not, you can slowly start
>adding the stuff you have above to your mail and then see where it goes
>wrong.
>>
>BTW. It's not against the law or anything to have colons in field names,
>but just to be on the safe side, I wouldn't use them. They serve no
>purpouse and it's just not customary to do so. I actually had to test to
>see if they really really work, and yes they do, but it's still quite
>odd to do so. I was thinking the old "dots are converted to undescores"
>trick...
>>
>--
>Rami.Elo...@gmail.com
>"Olemme apinoiden planeetalla."
>
>
>
hi yes your basic mail works, so it's something else.
it's a very weird set up I've inherited. They have the actual form
separated out and embeded in a flash app, so I can't even see it! Then
they ahve two separate php scripts, one to handle the form processing,
and this one to handle to email respone. but the form processor does
not seem to point to this email script. What a mess.
>
Well you could try looking at what the form actually passes to the
script. Put something like this at the very beginning of your mail script:

file_put_contents('my_mail_log.txt', print_r($_REQUEST, 1));

Kinda like trap what it's trying to send and try to figure out if
there's something wrong there, missing parameters or something.

The form being flash explains the colons though... Flash designers...

--
Rami.Elomaa@gmail.com
"Olemme apinoiden planeetalla."
Pete Marsh
Guest
 
Posts: n/a
#5: Apr 10 '07

re: Can anyone see a problem with this email script?


On Apr 10, 12:47 am, Rami Elomaa <rami.elo...@gmail.comwrote:
Quote:
Pete Marsh kirjoitti:
>
>
>
Quote:
On Apr 9, 2:34 pm, Rami Elomaa <rami.elo...@gmail.comwrote:
Quote:
Pete Marsh kirjoitti:
>
Quote:
Quote:
>Wondering if anyone can see an error with this script. I get a server
>configuration error. THat could mean a module is not being loaded, but
>maybe there's a syntax error here, can anyone spot it? Thanks
><?
>Error_Reporting(E_ALL & ~E_NOTICE);
>$subject="from ".$_REQUEST['Your_Name:'] ;
>$headers= "From: ".$_REQUEST['Your_Email:'] ."\n";
> $headers.='Content-type: text/html; charset=iso-8859-1';
> $message='';
> while ($field = current($_REQUEST)) {
> if ((key($_REQUEST)!="Your_Name:") && (key($_REQUEST)!
>="Your_Email:") && (key($_REQUEST)!="Message:") && (key($_REQUEST)!
>="i")) {
> $message.="<strong>".key($_REQUEST)."</strong>&nbsp;&nbsp;&nbsp;".
>$field."<br>";
> }
> next($_REQUEST);
> }
>$message.="<br>".$_REQUEST['Message:'];
>mail($_REQUEST['recipient'], $subject, "
><html>
><head>
> <title>Contact letter</title>
></head>
><body>
><br>
> ".$message."
></body>
></html>" , $headers);
>echo ("Your message was successfully sent!");
>?>
Have you tried with the very simplest possible mail? I mean just leave
out all the form shit and custom headers and such and just try:
>
Quote:
Quote:
mail('your_em...@example.com','this is a test', 'Hello Kitty!');
>
Quote:
Quote:
And if you get a server configuration error with that, then it's not a
php problem, it's a configuration problem. If not, you can slowly start
adding the stuff you have above to your mail and then see where it goes
wrong.
>
Quote:
Quote:
BTW. It's not against the law or anything to have colons in field names,
but just to be on the safe side, I wouldn't use them. They serve no
purpouse and it's just not customary to do so. I actually had to test to
see if they really really work, and yes they do, but it's still quite
odd to do so. I was thinking the old "dots are converted to undescores"
trick...
>
Quote:
Quote:
--
Rami.Elo...@gmail.com
"Olemme apinoiden planeetalla."
>
Quote:
hi yes your basic mail works, so it's something else.
it's a very weird set up I've inherited. They have the actual form
separated out and embeded in a flash app, so I can't even see it! Then
they ahve two separate php scripts, one to handle the form processing,
and this one to handle to email respone. but the form processor does
not seem to point to this email script. What a mess.
>
Well you could try looking at what the form actually passes to the
script. Put something like this at the very beginning of your mail script:
>
file_put_contents('my_mail_log.txt', print_r($_REQUEST, 1));
>
Kinda like trap what it's trying to send and try to figure out if
there's something wrong there, missing parameters or something.
>
The form being flash explains the colons though... Flash designers...

Unfortunately, the form is embedded in a flash binary!
I cannot see the source code at this time.
Unbelievable!

Rami Elomaa
Guest
 
Posts: n/a
#6: Apr 10 '07

re: Can anyone see a problem with this email script?


Pete Marsh kirjoitti:
Quote:
On Apr 10, 12:47 am, Rami Elomaa <rami.elo...@gmail.comwrote:
Quote:
>Pete Marsh kirjoitti:
>>
>>
>>
Quote:
>>On Apr 9, 2:34 pm, Rami Elomaa <rami.elo...@gmail.comwrote:
>>>Pete Marsh kirjoitti:
>>>>Wondering if anyone can see an error with this script. I get a server
>>>>configuration error. THat could mean a module is not being loaded, but
>>>>maybe there's a syntax error here, can anyone spot it? Thanks
>>>><?
>>>>Error_Reporting(E_ALL & ~E_NOTICE);
>>>>$subject="from ".$_REQUEST['Your_Name:'] ;
>>>>$headers= "From: ".$_REQUEST['Your_Email:'] ."\n";
>>>> $headers.='Content-type: text/html; charset=iso-8859-1';
>>>> $message='';
>>>> while ($field = current($_REQUEST)) {
>>>> if ((key($_REQUEST)!="Your_Name:") && (key($_REQUEST)!
>>>>="Your_Email:") && (key($_REQUEST)!="Message:") && (key($_REQUEST)!
>>>>="i")) {
>>>> $message.="<strong>".key($_REQUEST)."</strong>&nbsp;&nbsp;&nbsp;".
>>>>$field."<br>";
>>>> }
>>>> next($_REQUEST);
>>>> }
>>>>$message.="<br>".$_REQUEST['Message:'];
>>>>mail($_REQUEST['recipient'], $subject, "
>>>><html>
>>>><head>
>>>> <title>Contact letter</title>
>>>></head>
>>>><body>
>>>><br>
>>>> ".$message."
>>>></body>
>>>></html>" , $headers);
>>>>echo ("Your message was successfully sent!");
>>>>?>
>>>Have you tried with the very simplest possible mail? I mean just leave
>>>out all the form shit and custom headers and such and just try:
>>>mail('your_em...@example.com','this is a test', 'Hello Kitty!');
>>>And if you get a server configuration error with that, then it's not a
>>>php problem, it's a configuration problem. If not, you can slowly start
>>>adding the stuff you have above to your mail and then see where it goes
>>>wrong.
>>>BTW. It's not against the law or anything to have colons in field names,
>>>but just to be on the safe side, I wouldn't use them. They serve no
>>>purpouse and it's just not customary to do so. I actually had to test to
>>>see if they really really work, and yes they do, but it's still quite
>>>odd to do so. I was thinking the old "dots are converted to undescores"
>>>trick...
>>>--
>>>Rami.Elo...@gmail.com
>>>"Olemme apinoiden planeetalla."
>>hi yes your basic mail works, so it's something else.
>>it's a very weird set up I've inherited. They have the actual form
>>separated out and embeded in a flash app, so I can't even see it! Then
>>they ahve two separate php scripts, one to handle the form processing,
>>and this one to handle to email respone. but the form processor does
>>not seem to point to this email script. What a mess.
>Well you could try looking at what the form actually passes to the
>script. Put something like this at the very beginning of your mail script:
>>
>file_put_contents('my_mail_log.txt', print_r($_REQUEST, 1));
>>
>Kinda like trap what it's trying to send and try to figure out if
>there's something wrong there, missing parameters or something.
>>
>The form being flash explains the colons though... Flash designers...
>
>
Unfortunately, the form is embedded in a flash binary!
I cannot see the source code at this time.
Unbelievable!
>
That's quite alright. That's why I told you to check what the form sends
to the mail script. Insert this line at the beginning of the mailer
script so you'll see what the flash form sends to the mailer, even if
you can't see what is happening inside the flash:

file_put_contents('my_mail_log.txt', print_r($_REQUEST, 1));

And then try sending mail from the flash application and study the
results in my_mail_log.txt.

--
Rami.Elomaa@gmail.com
"Olemme apinoiden planeetalla."
Toby A Inkster
Guest
 
Posts: n/a
#7: Apr 10 '07

re: Can anyone see a problem with this email script?


Pete Marsh wrote:
Quote:
mail($_REQUEST['recipient']
SPAMMER!

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
FFMG
Guest
 
Posts: n/a
#8: Apr 10 '07

re: Can anyone see a problem with this email script?



Toby A Inkster;60036 Wrote:
Quote:
Pete Marsh wrote:
>
Quote:
mail($_REQUEST['recipient']
>
SPAMMER!
>
>
Why do you say that?

FFMG


--
FFMG

'webmaster forum' (http://www.httppoint.com) | 'webmaster Directory'
(http://www.webhostshunter.com/) | 'Recreation Vehicle insurance'
(http://www.insurance-owl.com/other/car_rec.php)
http://urlkick.com/-Free URL redirection service
------------------------------------------------------------------------
FFMG's Profile: http://www.httppoint.com/member.php?userid=580
View this thread: http://www.httppoint.com/showthread.php?t=13789

Message Posted via the webmaster forum http://www.httppoint.com, (Ad revenue sharing).

Toby A Inkster
Guest
 
Posts: n/a
#9: Apr 11 '07

re: Can anyone see a problem with this email script?


FFMG wrote:
Quote:
Toby A Inkster;60036 Wrote:
Quote:
>Pete Marsh wrote:
>>
Quote:
>>mail($_REQUEST['recipient']
>>
>SPAMMER!
>
Why do you say that?
http://pete-marsh.example.com/script...im@example.net

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
FFMG
Guest
 
Posts: n/a
#10: Apr 11 '07

re: Can anyone see a problem with this email script?



Toby A Inkster;60073 Wrote:
Quote:
FFMG wrote:
Quote:
Toby A Inkster;60036 Wrote:
Quote:
Pete Marsh wrote:
>
>mail($_REQUEST['recipient']
>
SPAMMER!
Why do you say that?
>
http://tinyurl.com/365y5x
>
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
>
* = I'm getting there!
Yes, that makes it a bad script.
But it does not make him a spammer.

Or maybe I am not understanding your cryptic replies, add a few more
words to make your point clearer.

FFMG


--

'webmaster forum' (http://www.httppoint.com) | 'webmaster Directory'
(http://www.webhostshunter.com/) | 'Recreation Vehicle insurance'
(http://www.insurance-owl.com/other/car_rec.php)
'Free URL redirection service' (http://urlkick.com/)
------------------------------------------------------------------------
FFMG's Profile: http://www.httppoint.com/member.php?userid=580
View this thread: http://www.httppoint.com/showthread.php?t=13789

Message Posted via the webmaster forum http://www.httppoint.com, (Ad revenue sharing).

Pete Marsh
Guest
 
Posts: n/a
#11: Apr 11 '07

re: Can anyone see a problem with this email script?


On Apr 10, 3:27 pm, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
Quote:
FFMG wrote:
Quote:
Toby A Inkster;60036 Wrote:
Quote:
Pete Marsh wrote:
>
Quote:
Quote:
>mail($_REQUEST['recipient']
>
Quote:
Quote:
SPAMMER!
>
Quote:
Why do you say that?
>
http://pete-marsh.example.com/script.....@example.net
>
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
>
* = I'm getting there!



you're getting nowhere, you are an idiot.
I just inherited this script, I didn't write it.
probably you wrote it, which is why it's so bad.

Pete Marsh
Guest
 
Posts: n/a
#12: Apr 11 '07

re: Can anyone see a problem with this email script?


On Apr 10, 3:51 am, Rami Elomaa <rami.elo...@gmail.comwrote:
Quote:
Pete Marsh kirjoitti:
>
>
>
Quote:
On Apr 10, 12:47 am, Rami Elomaa <rami.elo...@gmail.comwrote:
Quote:
Pete Marsh kirjoitti:
>
Quote:
Quote:
>On Apr 9, 2:34 pm, Rami Elomaa <rami.elo...@gmail.comwrote:
>>Pete Marsh kirjoitti:
>>>Wondering if anyone can see an error with this script. I get a server
>>>configuration error. THat could mean a module is not being loaded, but
>>>maybe there's a syntax error here, can anyone spot it? Thanks
>>><?
>>>Error_Reporting(E_ALL & ~E_NOTICE);
>>>$subject="from ".$_REQUEST['Your_Name:'] ;
>>>$headers= "From: ".$_REQUEST['Your_Email:'] ."\n";
>>> $headers.='Content-type: text/html; charset=iso-8859-1';
>>> $message='';
>>> while ($field = current($_REQUEST)) {
>>> if ((key($_REQUEST)!="Your_Name:") && (key($_REQUEST)!
>>>="Your_Email:") && (key($_REQUEST)!="Message:") && (key($_REQUEST)!
>>>="i")) {
>>> $message.="<strong>".key($_REQUEST)."</strong>&nbsp;&nbsp;&nbsp;".
>>>$field."<br>";
>>> }
>>> next($_REQUEST);
>>> }
>>>$message.="<br>".$_REQUEST['Message:'];
>>>mail($_REQUEST['recipient'], $subject, "
>>><html>
>>><head>
>>> <title>Contact letter</title>
>>></head>
>>><body>
>>><br>
>>> ".$message."
>>></body>
>>></html>" , $headers);
>>>echo ("Your message was successfully sent!");
>>>?>
>>Have you tried with the very simplest possible mail? I mean just leave
>>out all the form shit and custom headers and such and just try:
>>mail('your_em...@example.com','this is a test', 'Hello Kitty!');
>>And if you get a server configuration error with that, then it's not a
>>php problem, it's a configuration problem. If not, you can slowly start
>>adding the stuff you have above to your mail and then see where it goes
>>wrong.
>>BTW. It's not against the law or anything to have colons in field names,
>>but just to be on the safe side, I wouldn't use them. They serve no
>>purpouse and it's just not customary to do so. I actually had to test to
>>see if they really really work, and yes they do, but it's still quite
>>odd to do so. I was thinking the old "dots are converted to undescores"
>>trick...
>>--
>>Rami.Elo...@gmail.com
>>"Olemme apinoiden planeetalla."
>hi yes your basic mail works, so it's something else.
>it's a very weird set up I've inherited. They have the actual form
>separated out and embeded in a flash app, so I can't even see it! Then
>they ahve two separate php scripts, one to handle the form processing,
>and this one to handle to email respone. but the form processor does
>not seem to point to this email script. What a mess.
Well you could try looking at what the form actually passes to the
script. Put something like this at the very beginning of your mail script:
>
Quote:
Quote:
file_put_contents('my_mail_log.txt', print_r($_REQUEST, 1));
>
Quote:
Quote:
Kinda like trap what it's trying to send and try to figure out if
there's something wrong there, missing parameters or something.
>
Quote:
Quote:
The form being flash explains the colons though... Flash designers...
>
Quote:
Unfortunately, the form is embedded in a flash binary!
I cannot see the source code at this time.
Unbelievable!
>
That's quite alright. That's why I told you to check what the form sends
to the mail script. Insert this line at the beginning of the mailer
script so you'll see what the flash form sends to the mailer, even if
you can't see what is happening inside the flash:
>
file_put_contents('my_mail_log.txt', print_r($_REQUEST, 1));
>
And then try sending mail from the flash application and study the
results in my_mail_log.txt.

Thanks for these interesting replies.

The script is so bad, I think I'm goign to have to do it again.
The flash part isn't even done right either, so I have to make a test
form in any case.

Can you recommend a good generic php form parser?
Simpler the better.

Pete Marsh
Guest
 
Posts: n/a
#13: Apr 11 '07

re: Can anyone see a problem with this email script?


On Apr 10, 9:05 pm, FFMG <FFMG.2ou...@no-mx.httppoint.comwrote:
Quote:
Toby A Inkster;60073 Wrote:
>
>
>
Quote:
FFMG wrote:
Quote:
Toby A Inkster;60036 Wrote:
>Pete Marsh wrote:
>
Quote:
Quote:
>>mail($_REQUEST['recipient']
>
Quote:
Quote:
>SPAMMER!
>
Quote:
Quote:
Why do you say that?
>>
Quote:
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
>
Quote:
* = I'm getting there!
>
Yes, that makes it a bad script.
But it does not make him a spammer.
>
Or maybe I am not understanding your cryptic replies, add a few more
words to make your point clearer.

Some people just like to make a lot of noise.

Rami Elomaa
Guest
 
Posts: n/a
#14: Apr 11 '07

re: Can anyone see a problem with this email script?


Toby A Inkster kirjoitti:
Quote:
FFMG wrote:
Quote:
>Toby A Inkster;60036 Wrote:
Quote:
>>Pete Marsh wrote:
>>>
>>>mail($_REQUEST['recipient']
>>SPAMMER!
>Why do you say that?
>
http://pete-marsh.example.com/script...im@example.net
>
Yeah, but that's a Flash aplication he's working with. A Flash
application in my opinion is much more difficult to exploit than your
regular formmail. And for pity's sake, he wouldn't be the spammer here,
just a web developer who's not completly aware of spammer tactics.
Instead of accusing him for something he's not guilty, you could educate
him.

--
Rami.Elomaa@gmail.com
"Olemme apinoiden planeetalla."
Rami Elomaa
Guest
 
Posts: n/a
#15: Apr 11 '07

re: Can anyone see a problem with this email script?


Pete Marsh kirjoitti:
Quote:
On Apr 10, 3:51 am, Rami Elomaa <rami.elo...@gmail.comwrote:
Quote:
>Pete Marsh kirjoitti:
>>
>>
>>
Quote:
>>On Apr 10, 12:47 am, Rami Elomaa <rami.elo...@gmail.comwrote:
>>>Pete Marsh kirjoitti:
>>>>On Apr 9, 2:34 pm, Rami Elomaa <rami.elo...@gmail.comwrote:
>>>>>Pete Marsh kirjoitti:
>>>>>>Wondering if anyone can see an error with this script. I get a server
>>>>>>configuration error. THat could mean a module is not being loaded, but
>>>>>>maybe there's a syntax error here, can anyone spot it? Thanks
>>>>>><?
>>>>>>Error_Reporting(E_ALL & ~E_NOTICE);
>>>>>>$subject="from ".$_REQUEST['Your_Name:'] ;
>>>>>>$headers= "From: ".$_REQUEST['Your_Email:'] ."\n";
>>>>>> $headers.='Content-type: text/html; charset=iso-8859-1';
>>>>>> $message='';
>>>>>> while ($field = current($_REQUEST)) {
>>>>>> if ((key($_REQUEST)!="Your_Name:") && (key($_REQUEST)!
>>>>>>="Your_Email:") && (key($_REQUEST)!="Message:") && (key($_REQUEST)!
>>>>>>="i")) {
>>>>>> $message.="<strong>".key($_REQUEST)."</strong>&nbsp;&nbsp;&nbsp;".
>>>>>>$field."<br>";
>>>>>> }
>>>>>> next($_REQUEST);
>>>>>> }
>>>>>>$message.="<br>".$_REQUEST['Message:'];
>>>>>>mail($_REQUEST['recipient'], $subject, "
>>>>>><html>
>>>>>><head>
>>>>>> <title>Contact letter</title>
>>>>>></head>
>>>>>><body>
>>>>>><br>
>>>>>> ".$message."
>>>>>></body>
>>>>>></html>" , $headers);
>>>>>>echo ("Your message was successfully sent!");
>>>>>>?>
>>>>>Have you tried with the very simplest possible mail? I mean just leave
>>>>>out all the form shit and custom headers and such and just try:
>>>>>mail('your_em...@example.com','this is a test', 'Hello Kitty!');
>>>>>And if you get a server configuration error with that, then it's not a
>>>>>php problem, it's a configuration problem. If not, you can slowly start
>>>>>adding the stuff you have above to your mail and then see where it goes
>>>>>wrong.
>>>>>BTW. It's not against the law or anything to have colons in field names,
>>>>>but just to be on the safe side, I wouldn't use them. They serve no
>>>>>purpouse and it's just not customary to do so. I actually had to test to
>>>>>see if they really really work, and yes they do, but it's still quite
>>>>>odd to do so. I was thinking the old "dots are converted to undescores"
>>>>>trick...
>>>>>--
>>>>>Rami.Elo...@gmail.com
>>>>>"Olemme apinoiden planeetalla."
>>>>hi yes your basic mail works, so it's something else.
>>>>it's a very weird set up I've inherited. They have the actual form
>>>>separated out and embeded in a flash app, so I can't even see it! Then
>>>>they ahve two separate php scripts, one to handle the form processing,
>>>>and this one to handle to email respone. but the form processor does
>>>>not seem to point to this email script. What a mess.
>>>Well you could try looking at what the form actually passes to the
>>>script. Put something like this at the very beginning of your mail script:
>>>file_put_contents('my_mail_log.txt', print_r($_REQUEST, 1));
>>>Kinda like trap what it's trying to send and try to figure out if
>>>there's something wrong there, missing parameters or something.
>>>The form being flash explains the colons though... Flash designers...
>>Unfortunately, the form is embedded in a flash binary!
>>I cannot see the source code at this time.
>>Unbelievable!
>That's quite alright. That's why I told you to check what the form sends
>to the mail script. Insert this line at the beginning of the mailer
>script so you'll see what the flash form sends to the mailer, even if
>you can't see what is happening inside the flash:
>>
>file_put_contents('my_mail_log.txt', print_r($_REQUEST, 1));
>>
>And then try sending mail from the flash application and study the
>results in my_mail_log.txt.
>
>
Thanks for these interesting replies.
>
The script is so bad, I think I'm goign to have to do it again.
The flash part isn't even done right either, so I have to make a test
form in any case.
That might just be the best solution :)

--
Rami.Elomaa@gmail.com
"Olemme apinoiden planeetalla."
Toby A Inkster
Guest
 
Posts: n/a
#16: Apr 11 '07

re: Can anyone see a problem with this email script?


Rami Elomaa wrote:
Quote:
Yeah, but that's a Flash aplication he's working with. A Flash
application in my opinion is much more difficult to exploit than your
regular formmail.
Your opinion is wrong. The Flash object is just a frontend -- it doesn't
*need* to be exploited -- the script can still be used for spamming
purposes without even looking at the Flash.
Quote:
And for pity's sake, he wouldn't be the spammer here, just a web
developer who's not completly aware of spammer tactics.
Intentions don't really come into it. His script can emit spam, and given
enough time, will do.
Quote:
Instead of accusing him for something he's not guilty, you could educate
him.
I did -- in my initial post to this thread I quoted the 27 bytes of code
in his script that allow any miscreant to use his script to spam their way
across the globe.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Toby A Inkster
Guest
 
Posts: n/a
#17: Apr 11 '07

re: Can anyone see a problem with this email script?


FFMG wrote:
Quote:
add a few more words to make your point clearer.
No.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Jerry Stuckle
Guest
 
Posts: n/a
#18: Apr 11 '07

re: Can anyone see a problem with this email script?


Pete Marsh wrote:
Quote:
On Apr 10, 3:27 pm, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
Quote:
>FFMG wrote:
Quote:
>>Toby A Inkster;60036 Wrote:
>>>Pete Marsh wrote:
>>>>mail($_REQUEST['recipient']
>>>SPAMMER!
>>Why do you say that?
>http://pete-marsh.example.com/script.....@example.net
>>
>--
>Toby A Inkster BSc (Hons) ARCS
>Contact Me ~http://tobyinkster.co.uk/contact
>Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
>>
>* = I'm getting there!
>
>
>
>
you're getting nowhere, you are an idiot.
I just inherited this script, I didn't write it.
probably you wrote it, which is why it's so bad.
>
Sorry, I agree with Tony. Whether you wrote the script or inherit it,
if you use it your system will become a spam source.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
FFMG
Guest
 
Posts: n/a
#19: Apr 11 '07

re: Can anyone see a problem with this email script?



Jerry Stuckle;60118 Wrote:
Quote:
>
Quote:

you're getting nowhere, you are an idiot.
I just inherited this script, I didn't write it.
probably you wrote it, which is why it's so bad.
[/color]
>
Sorry, I agree with Tony. Whether you wrote the script or inherit it,
if you use it your system will become a spam source.
>
>
Yes but the way Tony replied does not help anybody, realistically what
could 'SPAMMER' mean?

Telling the user that the code could be injected, (and maybe explaining
how), makes more sense.

FFMG


--

'webmaster forum' (http://www.httppoint.com) | 'webmaster Directory'
(http://www.webhostshunter.com/) | 'Recreation Vehicle insurance'
(http://www.insurance-owl.com/other/car_rec.php)
'Free URL redirection service' (http://urlkick.com/)
------------------------------------------------------------------------
FFMG's Profile: http://www.httppoint.com/member.php?userid=580
View this thread: http://www.httppoint.com/showthread.php?t=13789

Message Posted via the webmaster forum http://www.httppoint.com, (Ad revenue sharing).

Toby A Inkster
Guest
 
Posts: n/a
#20: Apr 11 '07

re: Can anyone see a problem with this email script?


FFMG wrote:
Quote:
Jerry Stuckle Wrote:
Quote:
>>
>Sorry, I agree with Tony.
>
Yes but the way Tony
Argh!

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Rami Elomaa
Guest
 
Posts: n/a
#21: Apr 12 '07

re: Can anyone see a problem with this email script?


FFMG kirjoitti:
Quote:
Jerry Stuckle;60118 Wrote:
Quote:
Quote:
>>you're getting nowhere, you are an idiot.
>>I just inherited this script, I didn't write it.
>>probably you wrote it, which is why it's so bad.
>>[/color]
>Sorry, I agree with Tony. Whether you wrote the script or inherit it,
>if you use it your system will become a spam source.
>>
>>
>
Yes but the way Tony replied does not help anybody, realistically what
could 'SPAMMER' mean?
>
Telling the user that the code could be injected, (and maybe explaining
how), makes more sense.
>
Indeed. I just thought Toby's answer was brutal, rude and blunt. And it
did not help the poster at all, instead it just insulted. Now then, let
he who is without sin, cast the first stone. We all may be blunt and
rude on occasions and that is that.

--
Rami.Elomaa@gmail.com

"Wikipedia on vähän niinq internetin raamattu, kukaan ei pohjimmiltaan
usko siihen ja kukaan ei tiedä mikä pitää paikkansa." -- z00ze
Closed Thread