Jump to content

Urgent code help needed - auto email not working


PorkPie

Recommended Posts

These are questions...

your replies are usless..

 

Q: 1. does it email (check junk/spam)

A: 1. The code was all working before I added the // Send e-voucher email to customer

So thats a NO ? maybe ?

Q: 20000. Can you try the suggections

A: 20000. Beefcake

 

 

1. does it email (check junk/spam)

2. any errors (did you comment out the ob_start()'s

3. are your email server details correct ?

4. try echoing some date ie

$_REQUEST['contemail']

$aff

$_SESSION['bookingid']

 

we need details worst case add die("TEST"); at the start then test you get t he message TEST, move it down until you stop getting it, the line before is probably the problem!

Link to comment
Share on other sites

Q: 1. does it email (check junk/spam)

A: 1. The code was all working before I added the // Send e-voucher email to customer

So thats a NO ? maybe ?

 

 

 

1. does it email (check junk/spam)

 

No it doesn't email !!

 

2. any errors (did you comment out the ob_start()'s

 

No errors, yes I commented out the b_start()'s

 

3. are your email server details correct ?

 

Yes

 

4. try echoing some date ie

$_REQUEST['contemail']

$aff

$_SESSION['bookingid']

 

 

 

we need details worst case add die("TEST"); at the start then test you get t he message TEST, move it down until you stop getting it, the line before is probably the problem!

 

As mentioned, it's just this section that's the problem because I removed it and the page was visible again. It's preventing me from actually seeing the page and it's not sending any emails out, you can see the chunk I took out in my previous post.

 

 

OK here's a bit more code with the form WITHOUT the auto email code I need to add:

 

>>>>>>

 

<?

ini_set('error_reporting', E_ALL);

 

ob_start();

error_reporting("null");

session_start();

include("includes/config.php");

$userdet=array();

 

//insert the table

 

if(empty($_SESSION['bookingid']))

{

$userdet['detid']='';

$userdet['contname'] = $_REQUEST['contname'];

$userdet['contmidname '] = $_REQUEST['contmidname'];

$userdet['contsurname'] = $_REQUEST['contsurname'];

$userdet['contaddr'] = $_REQUEST['contaddr'];

$userdet['contcity'] = $_REQUEST['contcity'];

$userdet['contpostcode'] = $_REQUEST['contpostcode'];

$userdet['realship'] = $_REQUEST['relation'];

$userdet['contemail'] = $_REQUEST['contemail'];

$userdet['contnumber'] = $_REQUEST['contnumber'];

$userdet['bdefname'] = $_REQUEST['bdefirstname'];

$userdet['bdemldename'] =$_REQUEST['bdemiddlename'];

$userdet['bdesurname'] = $_REQUEST['bdesurname'];

$userdet['bdeaddr'] = $_REQUEST['bdeaddr'];

$userdet['bdecity'] = $_REQUEST['bdecity'];

$userdet['bdepostcode'] = $_REQUEST['bdepostcode'];

$userdet['grmfname'] = $_REQUEST['grmfirstname'];

$userdet['grmmldename'] = $_REQUEST['grmmiddlename'];

$userdet['grmsurname'] = $_REQUEST['grmsurname'];

$userdet['grmaddr'] = $_REQUEST['grmaddr'];

$userdet['grmcity'] = $_REQUEST['grmcity'];

$userdet['grmpostcode'] = $_REQUEST['grmpostcode'];

$userdet['bdrpartname'] = $_REQUEST['bdeparent'];

$userdet['grmpartname'] = $_REQUEST['grmparent'];

$userdet['bestmanname'] = $_REQUEST['bestmanname'];

$userdet['bridesmaid'] = $_REQUEST['bridename'];

$res=db_insert('tbluserdetails',$userdet);

if($res)

{

$rest=db_getRs('tbluserdetails','contemail="'.$_REQUEST['contemail'].'" and weddate="0000-00-00"');

$sql2=mysql_fetch_array($rest);

$bookingid=$sql2[0];

session_register("bookingid");

}

}

 

 

 

//update the table

if($_SESSION['bookingid'])

{

$userdet1=array();

$userdet1['contname'] = $_REQUEST['contname'];

$userdet1['contaddr'] = $_REQUEST['contaddr'];

$userdet1['contcity'] = $_REQUEST['contcity'];

$userdet1['contpostcode'] = $_REQUEST['contpostcode'];

$userdet1['realship'] = $_REQUEST['relation'];

$userdet1['contemail'] = $_REQUEST['contemail'];

$userdet1['contnumber'] = $_REQUEST['contnumber'];

$userdet1['bdefname'] = $_REQUEST['bdefirstname'];

$userdet1['bdemldename'] =$_REQUEST['bdemiddlename'];

$userdet1['bdesurname'] = $_REQUEST['bdesurname'];

$userdet1['bdeaddr'] = $_REQUEST['bdeaddr'];

$userdet1['bdecity'] = $_REQUEST['bdecity'];

$userdet1['bdepostcode'] = $_REQUEST['bdepostcode'];

$userdet1['grmfname'] = $_REQUEST['grmfirstname'];

$userdet1['grmmldename'] = $_REQUEST['grmmiddlename'];

$userdet1['grmsurname'] = $_REQUEST['grmsurname'];

$userdet1['grmaddr'] = $_REQUEST['grmaddr'];

$userdet1['grmcity'] = $_REQUEST['grmcity'];

$userdet1['grmpostcode'] = $_REQUEST['grmpostcode'];

$userdet1['bdrpartname'] = $_REQUEST['bdeparent'];

$userdet1['grmpartname'] = $_REQUEST['grmparent'];

$userdet1['bestmanname'] = $_REQUEST['bestmanname'];

$userdet1['bridesmaid'] = $_REQUEST['bridename'];

$res=db_update('tbluserdetails',$userdet1,'detid="'.$_SESSION['bookingid'].'"');

}

$res2=db_getRs('tbluserdetails','detid="'.$_SESSION['bookingid'].'"');

$sql=mysql_fetch_array($res2);

$wtime=explode(":", $sql['wedtime']);

$wmin=explode(" ",$wtime[1]);

$cdate=$_REQUEST['cdate'];

$cutdate=explode("-",$sql['weddate']);

 

 

//calculate the date

if($_REQUEST['cdate'])

{

$cutdate=explode("-", $_REQUEST['cdate']);

}

$year=$cutdate[0];

$mon=$cutdate[1];

$day=$cutdate[2];

 

switch ($mon)

{

  case 1: $mon="Jan"; break;

  case 2: $mon="Feb"; break;

  case 3: $mon="Mar"; break;

  case 4: $mon="Apr"; break;

  case 5: $mon="May"; break;

  case 6: $mon="Jun"; break;

  case 7: $mon="Jul"; break;

  case 8: $mon="Aug"; break;

  case 9: $mon="Sep"; break;

  case 10: $mon="Oct"; break;

  case 11: $mon="Nov"; break;

  case 12: $mon="Dec"; break;

}

 

 

?>

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<script language="JavaScript" src="js/misc.js" type="text/javascript">

</script>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

 

<title>Wedding By miiiiii.com - Check Availability</title>

 

<link href="../../css/miiiii.css" rel="stylesheet" type="text/css" />

<link href="../../css/booking.css" rel="stylesheet" type="text/css" />

 

<script language="JavaScript" src="js/booking.js" type="text/javascript">

</script>

</head>

 

 

<body>

<!--Divs-->

<div id="wrapper">

<div id="container">

<div id="header">Page 2</div>

<div id="content">

  <div id="maintxtwide">

    <div id="divformwrapper">

      <form action="music.php"  method="post"  name="weddingdet" id="weddingdet" onsubmit="return weddet()">

        <span class="bold">The  Day</span><br />

        <br />

        <div id="divformsect1">

          <span class="left">

            <label>Date Of Wedding:<br />

              </label>

            <br />

            <select  name="mon" class="option">

              <option >

                <?=$mon?>

                </option>

              </select>

             

            <select name="day" class="option">

              <option>

                <?=$day?>

                </option>

              </select>

             

            <select name="year" class="option">

              <option>

                <?=$year?>

                </option>

              </select>

            </span><span class="right">

              <label>Time Of Wedding:<br />

              </label>

              <br />

              <select name="wedhour" class="option">

                <option>HH</option>

                <option value="12" <?

  if($wtime[0]==12) { ?> selected="selected" <? }?> >12</option>

                <? for($hour=1;$hour<=11;$hour++)

{

        if($hour<10)

$hour="0".$hour;

?>

                <option value="<?=$hour?>" <? if($wtime[0]==$hour) { ?>  selected="selected" <? }?> >

                <?=$hour?>

                </option>

                <?}?>

              </select>

               

              <select name="wedmin" class="option">

                <option>MM</option>

                <?

for($min=0;$min<60;$min++)

{

          if($min<10)

  $min="0".$min;

?>

                <option value="<?=$min?>"<? if($wmin[0]==$min) { ?>  selected="selected" <? }?> >

                <?=$min?>

                </option>

                <? }?>

              </select>

              <br />

              <input name="htime" type="radio" class="radio" value="AM" <? if($wmin[1]=="AM") { ?> <? }?> />

              AM 

              </label>

              <input name="htime" type="radio" class="radio" value="PM" <? if($wmin[1]=="PM") { ?> <? }?> />

            PM</span> <br /></div>

          <br />

        <br />

        <div id="divformsect2">

          <div id="divColLeft"> <span class="bold"> Address: <br />

            <textarea name="cereaddr"><?=$sql['ceraddr']?></textarea>

            </span><br />

            <br />

            <label> Postal Code:<br /></label>

            <input type="text" name="cerepostcode" value="<?=$sql['cerpostcode']?>" />

           

            <br />

            <label>Minister:</label><br />

            <input type="text" name="minconduct" value="<?=$sql['min_cont']?>" /><br />

  <br />

  <label><span class="bold">Minister</span>s Telephone: <br /></label>

            <input type="text" name="cerephone" value="<?=$sql['certelphone']?>" />

            </div>

              <div id="divColRight">

                <label>Ministers Email: </label><br />

                <input type="text" name="minemail" value="<?=$sql['min_email']?>" />

               

                <br />

                <br />

                <label>Authorised <br />

                <br />

                </label>

                <br /><input name="video" type="radio" class="radio" value="yes" <? if($sql['auth_video']=="yes") { ?> <? }?> >

                Yes

                <input name="video" type="radio" class="radio" value="No"<? if($sql['auth_video']=="No")  {  ?> <? }?> >

                No

                <br />

                <br />

                <span class="bold">If You Have Some Additional Notes<br />

                <textarea name="videoauth"><?=$sql['auth_placement']?></textarea>

              </span></div>

            </div>

          <br />

        <br />

        <div id="divformsect3">

          <span class="left">

            <label>Reception Address: </label><br />

            <textarea name="repaddr"><?=$sql['repaddr']?></textarea>

           

            <br />

            <br />

            <label>Reception Postal Code: </label><br />

            <input type="text" name="reppostcode" value="<?=$sql['reppostcode']?>" />

            </span><span class="right">

              <label><br />

              Reception Telephone: </label><br />

              <input type="text" name="repphone" value="<?=$sql['repphone']?>" />

             

              <br />

              <br />

              <label>Reception Email: </label><br />

              <input type="text" name="repemail" value="<?=$sql['repemail']?>" />

             

            </span></div>

  <br />

        <div id="divformbtnright">

          <div id="divbkgbtn">

            <input name="btnweddetail" type="submit" class="bkingbtnblk" value="Next >>" />

            </div>

        </div>

      </form>

    </div>

  </div>

</div>

</div>

 

<div id="footer">v1 designed for ie(6+) firefox(2+) </div>

</div>

</body>

 

</html>

 

 

 

<<<<<<

 

This code works as it is, but what would be the code to add to auto send an email to this person?

 

Back soon.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.