Jump to content

Recommended Posts

Hello.  Please bare with me.  Another person set all this up and it has been hard to figure out what he did, plus I am not a very strong .php guy.

 

Here it goes.

 

We have a form that our staff fills out when they have a job to log into our production schedule.  Works fine.  We fill it out and it writes to MYSQL fine, I see that row was added.  Cool.  (Mind you the job number does not mean anything, it writes a sequencial number, we just use it and manually enter it into our online production system)

 

It is supposed to everyone back the number, job name, etc and it is not.  The only thing we have changed was add an email address, I mean literally 5 characters.  I was wondering if anyone had any insight why this is happening?  I know it's hard to tell, but I am sure you people know a hell of a lot more than me.

 

Also it is supposed to return a "Your marketing request has been e-mailed..." after you send the request to log a job in our system?

 

I attached the code. 

 

Thank you

   * NOTFICATION 
        */
   
        $subject_notify = "CDG Creative Services Request: ".$arr['page1']['project_name'];
        $message_notify = $message_generic;

	$m2 = array();
        $m2['html'] = nl2br($message_notify);
        $m2['text'] = $message_notify;
        define("CDG_DOMAIN", "contempodg.com");
        $cdg_list = array();
        $staff_cdg = array ('brett','renee','kate','eric','tiffani','trisha','jon','holly');//,'renee','kate','eric','tiffani'
        for ($f = 0; $f < count($staff_cdg); $f ++)
        {
            $cdg_email[] = $staff_cdg[$f].'@'.CDG_DOMAIN;
         
        }
        
        $emailer_notify = new Mailer($cdg_email,$_SESSION['page1']['email'], $subject_notify, $m2);
        
         /* CHECK FOR ATTACHMENTS */
    for ($c = 0; $c < $num_attach; $c ++)
    {
        if ($arr['attachment_name'][$c] != "")
        {
            $emailer_notify ->addAttachments($arr['attachment_type'][$c],$arr['attachment_name'][$c]);
        }
    }
    //E-MAIL CDG NOTIFICATION
   // debugVar($arr);
        $emailer_notify->sendEmail('text');
   



		echo "Your marketing request has been e-mailed, a copy wil be sent to {$arr['page1']['email']} for your records. Please <A href=\"".$_SERVER['PHP_SELF']."\"> click here to send another request.</A><BR><BR>";

Link to comment
https://forums.phpfreaks.com/topic/119671-email-script-not-returning-email/
Share on other sites

It is supposed to everyone back the number, job name, etc

Im guessing this is supposed to say

It is supposed to EMAIL everyone back the number, job name, etc and it is not

 

You have not included enough code to diagnose the issue. There are many variables set prior to where you have copied and pasted the code that could affect the outcome.

 

What do you mean by

The only thing we have changed was add an email address, I mean literally 5 characters

Where did you add this?

 

Do you get any output on screen?

Have you checked your server mail logs after this program runs to see if the messages are malformed or have any other errors?

 

If you dont see anything on screen you may have errors turned off. Add this to the top of the script:

ini_set('display_errors', 'On');

Sorry I am on cold medicine today, am sick.

 

Yes it is supposed to say EMAIL.

 

Sorry I included just that snippet of the code because that was all that was changed, my bad.

 

I changed the email in the part of the code I added and in the General Form Processing Functions file.  Don't know if that helps.

 

When I submit the form, it does not come back with the "Thank you..." but there is the header is there.  So the return form seems to be there.

 

Should I turn the errors off in the General Form Processing Functions .php file?  Thanks

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.