mail() issue

rjmartino

Verified User
Joined
Dec 13, 2004
Messages
5
Please Help!! I'm having the same problem and would love some help. I've got simple php code

Code:
			$to = [email][email protected][/email]';
			
			$subject = 'Sugar in the Raw Street Team Application';
			
			/* To send HTML mail, you can set the Content-type header. */
			$headers  = "MIME-Version: 1.0\r\n";
			$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
			$headers .= "From: Sugar in the Raw <$email>\r\n";

			$content = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';
			$content .= '<html>';
			$content .= '<head>';
			$content .= '<title>Street Team Sign Up Form</title>';
			$content .= '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">';
			$content .= '</head>';
			$content .= '<body>';
			$content .= 'This is an automated notice that a user would like to apply to be a Street Team Member.  The users information is listed bellow.<br><br>';
			$content .= '<table><tr><td colspan="2">User Information</td></tr>';
			$content .= '<tr><td>Name</td><td>'.$name.'</td></tr>';
			if ($address) {
				$content .= '<tr><td>Address</td><td>'.$address.'</td></tr>';
			}
			$content .= '<tr><td>City</td><td>'.$city.'</td></tr>';
			$content .= '<tr><td>State</td><td>'.$state.'</td></tr>';
			$content .= '<tr><td>Phone</td><td>'.$phone.'</td></tr>';
			$content .= '<tr><td>Email</td><td>'.$email.'</td></tr>';
			$content .= '<tr><td colspan="2"></td></tr>';
			if ($age) {
				$content .= '<tr><td>Age</td><td>'.$age.'</td></tr>';
				$content .= '<tr><td colspan="2"></td></tr>';
			}
			if ($favorite) {
				$content .= '<tr><td colspan="2">Favorite Bands</td></tr>';
				$content .= '<tr><td colspan="2">'.$favorite.'</td></tr>';
			}
			if ($shows) {
				$content .= '<tr><td colspan="2">Recent Shows</td></tr>';
				$content .= '<tr><td colspan="2">'.$shows.'</td></tr>';
			}
			$content .= '</table>';
			$content .= '</body>';
			$content .= '</html>';
			if (mail($to, $subject, $content, $headers)) {
				echo "<center>Thank you for submitting, you should hear from us soon.</center>";
				$error = -1;
			}

It is working on a debian server (no control panel), but not on my new freebsd server (running DirectAdmin). It runs through the code like it works but then it just never sends the email.

One post I read told me to check out my sendmail and this is what it is telling me

Code:
iProvInternal# ls -al /usr/sbin/sendmail
lrwxr-xr-x  1 root  wheel  4 Nov  6 01:33 /usr/sbin/sendmail -> exim


  • I don't know how to make sure sendmail is running. Do you know how to do that?
  • could there be a queue I should check?
  • how can I check to make sure it's resolving lookups correctly?

Any ideas would help.
 
Back
Top