Solved

emails Not Sending

Posted on 2014-02-27
13
150 Views
Last Modified: 2014-02-28
I have a site that is not connected to Wordpress.  It might soon be.  However; at this point the email form is not sending emails.  Does the Wordpress have anything to do with this, or what could it be?

http://www.bricooper.net

Go to contact.

Thnak you.
0
Comment
Question by:DS928
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
13 Comments
 
LVL 7

Expert Comment

by:Milind Koyande
ID: 39894178
How you are sending email when user fills the form? Any code?
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39894540
Your form is posting this page http://www.bricooper.net/artist.php?view=contacts and that page does not exist.
0
 

Author Comment

by:DS928
ID: 39896441
Here is the code.  Two things aren't happening. The first is that it's not checking for errors and the second is that it is not sending the email's.
artist-view-contacts.php
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39896465
Look at your code.  The form is posting to http://www.bricooper.net/artist.php?view=contacts  and you are giving me code for a page called artist-view-contacts.php.

Those do not match.  Change your form action to hit artist-view-contacts.php.
0
 

Author Comment

by:DS928
ID: 39896476
I changed it......but it still isn't sending.
artist-view-contacts.php
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39896487
When I click the the share link on the left I get a pop up on http://www.bricooper.net/popup.php?do=tell when I view source, the form action is set to

<form method='post' action='/popup.php?do=tell&id=' name='cform'>  

You also have javascript file that loading that is not existent
http://www.bricooper.net/__utm.js

Double check your code as well as validating http://validator.w3.org/check?uri=http%3A%2F%2Fwww.bricooper.net%2Fpopup.php%3Fdo%3Dtell&charset=%28detect+automatically%29&doctype=Inline&group=0
0
 

Author Comment

by:DS928
ID: 39896513
The popup is my next headache.  Right now I am trying to get the contact form to work with the email.
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39896591
Is this the code that is supposed to be sending mail?
<?php
		$error		= '';
		$name		= '';
		$company	= '';
		$phone		= '';
		$email		= '';
		$subject	= '';
		$message	= '';
		$verify		= '';

		if(isset($_POST['contactus'])) {

		$name		= $_POST['name'];
		$company	= $_POST['company'];
		$phone		= $_POST['phone'];
		$email		= $_POST['email'];
		$subject	= $_POST['subject'];
		$message	= $_POST['message'];
		$verify		= $_POST['verify'];

		if(trim($name) == '') {
			$error = '<div class="error_message">Attention! You must enter your name.</div>';
		} else if(trim($email) == '') {
			$error = '<div class="error_message">Attention! Please enter a valid email address.</div>';
		} else if(!isEmail($email)) {
			$error = '<div class="error_message">Attention! You have enter an invalid e-mail address, try again.</div>';
		
		} else if(trim($comments) == '') {
			$error = '<div class="error_message">Attention! Please enter a message.</div>';
		
		} else if(trim($verify) == '') {
			$error = '<div class="error_message">Attention! Please enter the verification number.</div>';
		
		} else if(trim($verify) != '9') {
			$error = '<div class="error_message">Attention! The verification number you entered is incorrect.</div>';
		}

		if($error == '') {

			if(get_magic_quotes_gpc()) {
				$comments = stripslashes($comments);
			}

		$address = "ds@schuremediagroup.com";


		$e_subject = 'You\'ve been contacted by ' . $name . '.';


		$e_body = "You have been contacted by $name with regards to $subject, their additional message is as follows.\r\n\n";
		$e_content = "\"$comments\"\r\n\n";

		$e_reply = "You can contact $name via email, $email";

		$msg = $e_body . $e_content . $e_reply;

		if(mail($address, $e_subject, $msg, "From: $email\r\nReply-To: $email\r\nReturn-Path: $email\r\n"))
		{
			 echo "<div id='success_page'>";
			 echo "<h1>Email Sent Successfully.</h1>";
			 echo "<p>Thank you <strong>$name</strong>, your message has been submitted to us.</p>";
			 echo "</div>";
		 } else echo "Error. Mail not sent";

		}
	}

		if(!isset($_POST['contactus']) || $error != '') // Do not edit.
		{
?>

Open in new window

Also I am pretty sure where you have form names like

name='form[phone]'

it should simply be

name="phone"
0
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 39896593
0
 

Author Comment

by:DS928
ID: 39896602
Yes that is the code.  I am looking over it again.
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39896642
I'm not a php expert, but I can't see where you are actually sending.
0
 

Author Closing Comment

by:DS928
ID: 39896649
It was in the <Form></Form>  the Send button wasn't sending.  Than you for your help.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
alert on input text 2 23
Need to add another Column in Powershell script output 2 32
CSS - Centering an image 2 23
xml with php question 5 30
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question