Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
KillerCrazzy
Hangin' Around



Joined: Apr 08, 2005
Posts: 26

PostPosted: Tue Sep 05, 2006 8:59 pm Reply with quote

this script for my recruit form i have nuke 7.9 patched my problem is that i cant get it to email meso this is what i have

Code:
<?

include("header.php");
OpenTable();
?>

<?
$EmailTo = "emailaddress";
$Subject = "subject";
$App = "Real Name: $RealName\n \n Game Name: $GameName\n \n What Game: $Game\n \n Age: $Age\n \n Location: $Location\n \n TimeZone: $TimeZone\n \n Email Address: $EmailAddress\n \n Instant Messenger: $IM\n \n Messenger Type: $Messenger\n \n Hours spent online per week: $Hours\n \n Other Clans: $Clans\n \n About yourself: $About\n \n Can you make Donations?: $Pay\n \n Where did you hear about our Group?: $Where\n \n Can you Mod?: $mod\n \n IP Address: $REMOTE_ADDR";
mail($EmailTo,$Subject,$App,"From: $EmailAddress\n");
?>

<?
CloseTable();
include("footer.php");
?>

there is more but it will not let me post html stuff
Thx KillerCrazzy
 
View user's profile Send private message Visit poster's website
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Tue Sep 05, 2006 10:36 pm Reply with quote

You need to separate each set of header elements with a "\r\n", not "\n \n".

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
KillerCrazzy







PostPosted: Wed Sep 06, 2006 12:38 am Reply with quote

so your saying like this here
Code:


<?
include("header.php");
OpenTable();
?>

<?
$EmailTo = "email.com";
$Subject = "subject";
$App = "Real Name: $RealName\r Game Name: $GameName\n What Game: $Game\r Age: $Age\n Location: $Location\r TimeZone: $TimeZone\n Email Address: $EmailAddress\r Instant Messenger: $IM\n Messenger Type: $Messenger\r Hours spent online per week: $Hours\n Other Clans: $Clans\r About yourself: $About\n Can you make Donations?: $Pay\r Where did you hear about our Group?: $Where\n Can you Mod?: $mod\r IP Address: $REMOTE_ADDR";
mail($EmailTo,$Subject,$App,"From: $EmailAddress\n");
?>

<?
CloseTable();
include("footer.php");
?>


if not small detail off this code
tryed it like this still no email
 
montego







PostPosted: Wed Sep 06, 2006 5:42 am Reply with quote

I am sorry, I should have looked closer. The last string being passed into the "mail" function needs to include valid headers. I have used the following which works well for me:

$headers = "MIME-Version: 1.0\n"
."Content-Type: text/html; charset=iso-8859-1\r\n"
."From: $SenderName <$EmailAddress>\r\n"
."Return-Path: $EmailAddress\r\n"
."Reply-To: $EmailAddress\r\n"
."X-Mailer: MSHNL\r\n"
."X-Priority: 6\r\n";

And then I pass $headers in where you have your "from: " string. These headers are if you want HTML formatted email. If all you care about is text, then change the Content-Type from "text/html" to "text/text".

The "X-Mailer" can be changed to whatever you wish.

You may want to go back to using the older version of $App.
 
KillerCrazzy







PostPosted: Wed Sep 06, 2006 1:29 pm Reply with quote

so your saying this here
Code:


<?
include("header.php");
OpenTable();
?>

<?
$EmailTo = "emailcom";
$Subject = "subject";
$App = "Real Name: $RealName\r\n Game Name: $GameName\r\n What Game: $Game\r\n Age: $Age\r\n Location: $Location\r\n TimeZone: $TimeZone\r\n Email Address: $EmailAddress\r\n Instant Messenger: $IM\r\n Messenger Type: $Messenger\r\n Hours spent online per week: $Hours\r\n Other Clans: $Clans\r\n About yourself: $About\r\n Can you make Donations?: $Pay\r\n Where did you hear about our Group?: $Where\r\n Can you Mod?: $mod\r\n IP Address: $REMOTE_ADDR";
mail($EmailTo,$Subject,$App,"$headers: $EmailAddress\r\n");

$headers = "MIME-Version: 1.0\n"
."Content-Type: text/html; charset=iso-8859-1\r\n"
."From: $SenderName <$EmailAddress>\r\n"
."Return-Path: $EmailAddress\r\n"
."Reply-To: $EmailAddress\r\n"
."X-Mailer: MSHNL\r\n"
."X-Priority: 6\r\n";
?>

<?
CloseTable();
include("footer.php");
?>
 
montego







PostPosted: Thu Sep 07, 2006 6:06 am Reply with quote

No, more like this:

Code:


<?
include("header.php");
OpenTable();

$EmailTo = "emailcom";
$Subject = "subject";
$App = "Real Name: $RealName\n Game Name: $GameName\n What Game: $Game\n Age: $Age\n Location: $Location\n TimeZone: $TimeZone\n Email Address: $EmailAddress\n Instant Messenger: $IM\n Messenger Type: $Messenger\n Hours spent online per week: $Hours\n Other Clans: $Clans\n About yourself: $About\n Can you make Donations?: $Pay\n Where did you hear about our Group?: $Where\n Can you Mod?: $mod\n IP Address: $REMOTE_ADDR";
$headers = "MIME-Version: 1.0\n"
   ."Content-Type: text/html; charset=iso-8859-1\r\n"
   ."From: $SenderName <$EmailAddress>\r\n"
   ."Return-Path: $EmailAddress\r\n"
   ."Reply-To: $EmailAddress\r\n"
   ."X-Mailer: MSHNL\r\n"
   ."X-Priority: 6\r\n";
mail($EmailTo,$Subject,$App,$headers);

CloseTable();
include("footer.php");
?>


Give this a try. It may require some "tweaking", but this should be really close to what you need.
 
KillerCrazzy







PostPosted: Thu Sep 07, 2006 11:37 am Reply with quote

ok i tryed that but still no email so it must be the index file must be missing something there see if yea can find something wrong with it here
I delete most of all the < > for the html so it can be seen

Code:
<?

include("header.php");
OpenTable();
?>

head
title Recruitment Form /title
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/head

body
div align="center"
   h2 Recruitment Form /h2
   h4 Welcome to the Recruitment Form br
    please take the time to fill out this application forum and submit it. br
    We will get back with you as soon as possible br
    br
  Thank you. /h4
   p &nbsp; /p
  form action="apply.php" method="post" name="Application"
     br
    table width="35%" border="0" align="center" cellpadding="1" cellspacing="2" id="Table"
      tr
        td width="52%" Real Name: /td
        td width="48%" input name="RealName" type="text" size="25" /td
      /tr
      tr
        td GameName: /td
        td input name="GameName" type="text" size="25" /td
      /tr
     tr
        td What Game: /td
        td select name="game"
            option selected>----------------------- /option
            option Counter-Strike:Source /option
            option Day Of Defeat:Source /option
             option Battlefield 2 /option
          /select /td
      /tr
      tr
        td Age: /td
        td input name="Age" type="text"size="3" maxlength="2" /td
      /tr
      tr
        td Location: /td
        td input name="Location" type="text" size="25" /td
      /tr
     tr
        td TimeZone: /td
        td input name="TimeZone" type="text" size="25" /td
      /tr
      tr
         td Email Address: /td
         td input name="EmailAddress" type="text" size="25" /td
      /tr
      tr 
         td Instant Messenger: /td
        td input name="IM" type="text"size="25" /td
      /tr
      tr
        td &nbsp  /td
        td p
            label
            input type="radio" name="Messenger" value="AOL"
            AOL /label
            br
            label
            input type="radio" name="Messenger" value="MSN"
            MSN /label
            br
            label
            input type="radio" name="Messenger" value="Yahoo"
            Yahoo/label
            br
          /p /td
      /tr
      tr
         td Hours spent online per week: /td
         td input name="Hours" type="text" size="4" maxlength="3" /td
      /tr
      tr
        td colspan="2"><br> <div align="center"If you have been in a clan before,
            please list all of the<br
            ones you were in and the reason why you left them?<br>
            textarea name="Clans" cols="50" rows="10" /textarea
     div align="center">Please explain a little about
            yourself ? <br>
            textarea name="About" cols="50" rows="10" /textarea
      /tr>
      tr>
        tr>
        td>Can you make Donations?:</td
        td><select name="pay"
            option selected>Optional</option
            option>Yes</option
            option>NO</option
            option>SomeTimes</option
          /select></td>
      /tr>
      tr>
        td colspan="2">br> div align="center">Where did you hear about our
            Group?br>
            textarea name="Where" cols="50" rows="10" id=""></textarea
          /div>
          br></td
      /tr>
     tr>
        td>Can you Mod?: /td
        td><select name="mod"
            option selected ---------------------- /option
            option>Yes</option
            option>NO</option
            option>Would like to Learn</option
          /select></td
      /tr
    /table
   br
    input name="Submit" type="submit" value="Submit Recruitment Form"
  /form
  p &nbsp; /p
/div
/body
/html

<?
CloseTable();
include("footer.php");
?>
 
montego







PostPosted: Fri Sep 08, 2006 6:08 am Reply with quote

You say this:
Quote:

but still no email

That is what we need to concentrate on. I would set aside the whole form / process and concentrate on making sure you can even get the mail to work. One step at a time...

You say "no email", but what exactly are you saying? Do you get an email, but with the wrong information it it, or simply no mail at all?

Where are you testing this? Is this on a local test system or on a remotely hosted system? Have you checked to make sure that php is set up to mail?

Try simply this:

Code:


<?php
$headers = "MIME-Version: 1.0\n"
   ."Content-Type: text/html; charset=iso-8859-1\r\n"
   ."From: My Name <validemail@address.com>\r\n"
   ."Return-Path: [ Only registered users can see links on this board! Get registered or login! ]\r\n"
   ."Reply-To: [ Only registered users can see links on this board! Get registered or login! ]\r\n"
   ."X-Mailer: MSHNL\r\n"
   ."X-Priority: 6\r\n";
mail(validemail@address.com,"Test Email","Email Body Text",$headers);

?>


Substitute the "validemail@address.com" with valid email addresses to help you test this. Save this as a separate PHP script and run it outside of PHP-Nuke.
 
KillerCrazzy







PostPosted: Fri Sep 08, 2006 1:39 pm Reply with quote

im testing it on a host and im getting no email sent at all to the email account not even a blank page not a thing sent

and this email is not going to the site main email this is going to like lets say a hotmail or yahoo or an aim email account
 
montego







PostPosted: Fri Sep 08, 2006 10:57 pm Reply with quote

If this is a PHP-Nuke installation, are you getting registration emails? If this is not a PHP-Nuke installation, sounds like a potential host setup problem. You may need to ask them if the PHP function "mail" is setup to work properly. Ask them for a test script to help you validate.
 
KillerCrazzy







PostPosted: Sat Sep 09, 2006 10:15 am Reply with quote

its php-nuke and i just setup an email account with the provider and the email worked fine.email was sent right away

and for the recruit form still not emailing

also let me add i even tryed add the provider email to it and still did not send for some reson it will not send but if i email the accout threw outlook or a message program it will send an email to that account so i can only think that the script is not working..also tryed this script with nuke 7.8 and 7.9 i have 2 site that im trying it with and both no go
 
gregexp
The Mouse Is Extension Of Arm



Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Sat Sep 09, 2006 5:05 pm Reply with quote

If I may, Just a simple miss I believe, Montego Definatley Got this right, Ive tested it and am trying to help debug whats wrong with it.

change
mail(validemail@address.com,"Test Email","Email Body Text",$headers);

To
mail('validemail@address.com',"Test Email","Email Body Text",$headers);

Sorry I think it was just a simple miss. Hope this helps and dont forget to use VALID e-mails.

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
montego







PostPosted: Sat Sep 09, 2006 5:51 pm Reply with quote

Embarassed Embarassed Embarassed Embarassed Embarassed

Yep... I see it now... Thanks "D"!
 
KillerCrazzy







PostPosted: Sat Sep 09, 2006 9:50 pm Reply with quote

what do i do with this script here
Code:


<?php
$headers = "MIME-Version: 1.0\n"
   ."Content-Type: text/html; charset=iso-8859-1\r\n"
   ."From: My Name <validemail@address.com>\r\n"
   ."Return-Path: [ Only registered users can see links on this board! Get registered or login! ]\r\n"
   ."Reply-To: [ Only registered users can see links on this board! Get registered or login! ]\r\n"
   ."X-Mailer: MSHNL\r\n"
   ."X-Priority: 6\r\n";
mail('validemail@address.com',"Test Email","Email Body Text",$headers); 

?>

do i change all the [ Only registered users can see links on this board! Get registered or login! ] to my email account?
and were to i put this file here in the root and lanch it and what does it do send an email?
if it does not send an email then what?
 
KillerCrazzy







PostPosted: Sat Sep 09, 2006 9:58 pm Reply with quote

also i did a seach of some recruit form and found 2 of them and i had the same problem with them as i have right now with mine here
 
montego







PostPosted: Sun Sep 10, 2006 6:25 am Reply with quote

Quote:

do i change all the [ Only registered users can see links on this board! Get registered or login! ] to my email account?

Yes.

Quote:

and were to i put this file here in the root and lanch it and what does it do send an email?

Yes, as we need to debug why this isn't working and we need to take PHP-Nuke out of the "equation" right now.

Quote:

if it does not send an email then what?

Don't know. Keep trying to tweak this, but definitely get the host involved as I do not see why this would not work.
 
KillerCrazzy







PostPosted: Sun Sep 10, 2006 6:08 pm Reply with quote

ok this what i did changed all the [ Only registered users can see links on this board! Get registered or login! ]
to my email and uploaded it to my root
went to the website [ Only registered users can see links on this board! Get registered or login! ]
test php is the name of the script and when i went there all i got was a blank page and no email sent to the account

well i even tryed disabling NukeSentinel and trying both script and still both no email
also i have 2 providers from 2 diffrent sites that im trying to get this to run on
[ Only registered users can see links on this board! Get registered or login! ]
& [ Only registered users can see links on this board! Get registered or login! ]
 
montego







PostPosted: Tue Sep 12, 2006 5:40 am Reply with quote

KillerCrazzy, I have run out of ideas. The headers that you see here are what I use for the HTML Newsletter, which is a mass-mailer kind of script. Please repost here exactly the contents of your test.php script and I'll take one last look.
 
KillerCrazzy







PostPosted: Tue Sep 12, 2006 1:32 pm Reply with quote

ok here is what i have in the test this is a fake email so
Code:


<?php
$headers = "MIME-Version: 1.0\n"
   ."Content-Type: text/html; charset=iso-8859-1\r\n"
   ."From: My Name <killercrazzy@hotmail.com>\r\n"
   ."Return-Path: [ Only registered users can see links on this board! Get registered or login! ]\r\n"
   ."Reply-To: [ Only registered users can see links on this board! Get registered or login! ]\r\n"
   ."X-Mailer: MSHNL\r\n"
   ."X-Priority: 6\r\n";
mail('killercrazzy@hotmail.com',"Test Email","Email Body Text",$headers);

?>
 
KillerCrazzy







PostPosted: Tue Sep 12, 2006 10:53 pm Reply with quote

think i might know whats going on the site will not let me post html so how to add that to accept html on my site here is it in the main or header i dont rember and what is the code that i have to add
 
montego







PostPosted: Wed Sep 13, 2006 6:14 am Reply with quote

I am confused. I do not understand what HTML has to do with this? If you are saying that you are trying to post some code and the forums here are not allowing it, can you place it into a text file and then just post a link to it so we can download it?

Thanks.
 
KillerCrazzy







PostPosted: Wed Sep 13, 2006 10:44 am Reply with quote

nm this is a diffrent problem that this one site is not showing any html links on the news and shoutbox and in none of the blocks i think that problem is in the config.php but i dont rember what i hadde to change if yea know that one you can post that. oyea this is on the 7.8 Nuke Patched 3.2B
 
montego







PostPosted: Thu Sep 14, 2006 5:55 am Reply with quote

Only one topic per thread then please... per our rules here. Looks at the definition of the $AllowableHTML array and see if you can get that to work... or search here for similar questions / answers.

Unfortunately, I am at a loss as to what is going on with your mail. Are you sure the mail is not being sent? Could it be getting buried in a spam / bulk folder maybe? I have not used hotmail in a long, long, long time, so not sure if they have "turned up" the spam blocking.... other than this, I am plum out of ideas. Sad
 
KillerCrazzy







PostPosted: Thu Sep 14, 2006 6:29 pm Reply with quote

ok i got the test email to work it sent me a email that said
Email Body Text
what i did was turn down the spam settings in the account but i still get no email sent from that form

so i went back to the old way i did the apply.php

Code:


<?
include("header.php");
OpenTable();
?>

<?
$EmailTo = "myemail@whatever.com";
$Subject = "I would Like to Join Your Group";
$App = "Real Name: $RealName\n Game Name: $GameName\n What Game: $Game\n Age: $Age\n Location: $Location\n TimeZone: $TimeZone\n Email Address: $EmailAddress\n Instant Messenger: $IM\n Messenger Type: $Messenger\n Hours spent online per week: $Hours\n Other Clans: $Clans\n About yourself: $About\n Can you make Donations?: $Pay\n Where did you hear about our Group?: $Where\n Can you Mod?: $mod\n IP Address: $REMOTE_ADDR";
mail($EmailTo,$Subject,$App,"From: $EmailAddress\n");
?>

head>
title>Thank You</  title>
 meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 meta http-equiv="refresh" content="3;url=http://www.website.com/">
 /head>

 body>
  div align="center">
    h2  >Thank you for your Time</h2>
  p  > &nbsp;</   p>
/  div>
/  body>
  html>

<?
CloseTable();
include("footer.php");
?>


And well it sent the email but have too look at the code a bit more cuz some info was not filled in when i filled it in
so thx you for all your help iff you see a diffrent way to do this to this apply let me know here Thx agian for all the help
 
montego







PostPosted: Fri Sep 15, 2006 7:33 am Reply with quote

You are welcome. Just glad you are at least getting emails out now (or, actually, receiving them).
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
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


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©