forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Email ??
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
TomC
Newbie


Joined: 11 Aug 2003
Posts: 8

PostPosted: Wed Aug 13, 2003 4:01 pm    Post subject: ......... Reply with quote

No matter what i put in vds the email is always the same , the email is what i have on my server in the php .....
Back to top
View user's profile Send private message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Wed Aug 13, 2003 7:07 pm    Post subject: Reply with quote

You need to parse the input in PHP and assign the values transmitted to the appropriate PHP variables
to be sent off in your mail. It sound like you've got your variables hardcoded.

Greetz
Dr. Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
TomC
Newbie


Joined: 11 Aug 2003
Posts: 8

PostPosted: Wed Aug 13, 2003 7:47 pm    Post subject: ... Reply with quote

please remember <-- newbie , I hate to keep asking everyone to Give me everything : Sad .... Please explain a lil bit
Back to top
View user's profile Send private message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Wed Aug 13, 2003 9:40 pm    Post subject: Reply with quote

You could try a PHP script something like this:

Code:

<?php

echo "<html><body>";

$mailto = "address@yourserver.com";
$from = "From: somebody@someserver.com\n";

$subject = $HTTP_GET_VARS['subject'];
$body = $HTTP_GET_VARS['body'];

// Send the email
if(mail("$mailto", "$subject", "$body", "$from")) {
  echo "Mail sent!\n";
  } else {
  echo "Could not send email.\n";
  }             

echo "</body></html>";

?>


Then call this script named e.g. "test.php" like this:

http://www.yourserver.com/test.php?subject=ErrorReport&body=SomeText

Greetz
Dr. Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Aug 14, 2003 12:49 am    Post subject: Reply with quote

Actually your code could be even easier. The variables are set when you
use the parameters in the URL. So you don't have to do any processing for
them. Same with POST, if your PHP version supports it, you don't have to
use $HTTP_POST_VARS['body']; or something like that. Smile

Code:

<?php

echo "<html><body>";

$mailto = "address@yourserver.com";
$from = "From: somebody@someserver.com\n";

// Send the email
if(mail("$mailto", "$subject", "$body", "$from")) {
  echo "Mail sent!\n";
  } else {
  echo "Could not send email.\n";
  }             

echo "</body></html>";

?>

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
TomC
Newbie


Joined: 11 Aug 2003
Posts: 8

PostPosted: Thu Aug 14, 2003 3:12 am    Post subject: ................ Reply with quote

that works great , is there anyway to do it hidden ,I tryed to do it RUNH but that dont work and shellh isnt a command ....
Back to top
View user's profile Send private message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Thu Aug 14, 2003 5:26 am    Post subject: Reply with quote

FreezingFire wrote:
Actually your code could be even easier. The variables are set when you
use the parameters in the URL. So you don't have to do any processing for
them. Same with POST, if your PHP version supports it, you don't have to
use $HTTP_POST_VARS['body']; or something like that. Smile

Code:

<?php

echo "<html><body>";

$mailto = "address@yourserver.com";
$from = "From: somebody@someserver.com\n";

// Send the email
if(mail("$mailto", "$subject", "$body", "$from")) {
  echo "Mail sent!\n";
  } else {
  echo "Could not send email.\n";
  }             

echo "</body></html>";

?>


I don't think that that's gonna work on all PHP implementation, FF! But I'll check in out in a few minutes on
one of my own servers.

Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Thu Aug 14, 2003 5:40 am    Post subject: Reply with quote

Checked it out now. It's actually is a NO-GO with having those variables set automagically. They
must be declared on my server - PHP is not just PHP Confused

Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing


Last edited by Dr. Dread on Thu Aug 14, 2003 11:47 am; edited 1 time in total
Back to top
View user's profile Send private message
TomC
Newbie


Joined: 11 Aug 2003
Posts: 8

PostPosted: Thu Aug 14, 2003 11:20 am    Post subject: Reply with quote

This is what im using works fine

Code:
<?php

echo "<html><body>";

$mailto = "@emaill.com";
$from = "From: error@email\n";

// Send the email
if(mail("$mailto", "$subject", "$body", "$from")) {
  echo "Mail sent!\n";
  } else {
  echo "Could not send email.\n";
  }             

echo "</body></html>";

?>
Back to top
View user's profile Send private message
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Thu Aug 14, 2003 10:21 pm    Post subject: Reply with quote

Dr. Dread wrote:
Checked it out now. It's actually is a NO-GO with having those variables set automagically. They
must be declared on my server - PHP is not just PHP Confused

Greetz
Dread


It depends on the server configuration. Some servers that intend to have very high
security will disallow it. Still of course Dread's method will work no matter how the
server has configured PHP.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group