Sending email fails based on what the content is
Hi,
When I change the content of the email, it is not sent from my site.
$message .= $adv . "
"; $message .="Please Click here to publish this advertisement"; vs $message .="Please Click here to publish this advertisement"; $message .= $adv . "
"; This is the php for mail that is failing to be sent: ?php include 'includes/app_top.php'; include('includes/adv_class.php'); /* REGISTRATION STEP 1 */ //check the mail exists or not $head = FALSE; if ($head == TRUE) { $to = "[email protected]"; $subject = "Your confirmation link here"; $message = "Your Comfirmation link \r\n"; $message.="Click on this link to activate your account \r\n"; $from = ADMIN_EMAIL; $headers = "From:" . $from; $sentmail = mail($to, $subject, $message, $headers); echo "Without HTML"; } else { $data = 'ok restaurant'; $adv = 'advertisement'; $headers = "MIME-Version: 1.0\n"; $headers .="Content-type: text/html; charset=UTF-8\n"; $headers .="From:Social My Town<" . ADMIN_EMAIL . ">\n"; $to = "[email protected]"; $subject = "Your confirmation link here"; $message = "Your Comfirmation link \r\n"; $message .="Click on this link to activate your account \r\n"; $message .="Dear Member,
"; $message .="You have just posted a new advertisement on" . SITE_NAMEONLY; $message .="The title for the advertisement is
"; $message .="" . $data . "
"; $message .= $adv . "
"; $message .="Please Click here to publish this advertisement"; $from = ADMIN_EMAIL; $sentmail = mail($to, $subject, $message, $headers); // p($message); echo "In this mail not send"; } // if your email succesfully sent ?> This is the mail that is sent: \n"; $to = "[email protected]"; $subject = "Your confirmation link here"; $message = "Your Comfirmation link \r\n"; $message .="Click on this link to activate your account \r\n"; $message .="Dear Member,
"; $message .="You have just posted a new advertisement on" . SITE_NAMEONLY; $message .="The title for the advertisement is
"; $message .="" . $data . "
"; $message .="Please Click here to publish this advertisement"; $message .= $adv . "
"; $from = ADMIN_EMAIL; $sentmail = mail($to, $subject, $message, $headers); // p($message); echo "Mail send"; } // if your email succesfully sent ?> Thx.
"; $message .="Please Click here to publish this advertisement"; vs $message .="Please Click here to publish this advertisement"; $message .= $adv . "
"; This is the php for mail that is failing to be sent: ?php include 'includes/app_top.php'; include('includes/adv_class.php'); /* REGISTRATION STEP 1 */ //check the mail exists or not $head = FALSE; if ($head == TRUE) { $to = "[email protected]"; $subject = "Your confirmation link here"; $message = "Your Comfirmation link \r\n"; $message.="Click on this link to activate your account \r\n"; $from = ADMIN_EMAIL; $headers = "From:" . $from; $sentmail = mail($to, $subject, $message, $headers); echo "Without HTML"; } else { $data = 'ok restaurant'; $adv = 'advertisement'; $headers = "MIME-Version: 1.0\n"; $headers .="Content-type: text/html; charset=UTF-8\n"; $headers .="From:Social My Town<" . ADMIN_EMAIL . ">\n"; $to = "[email protected]"; $subject = "Your confirmation link here"; $message = "Your Comfirmation link \r\n"; $message .="Click on this link to activate your account \r\n"; $message .="Dear Member,
"; $message .="You have just posted a new advertisement on" . SITE_NAMEONLY; $message .="The title for the advertisement is
"; $message .="" . $data . "
"; $message .= $adv . "
"; $message .="Please Click here to publish this advertisement"; $from = ADMIN_EMAIL; $sentmail = mail($to, $subject, $message, $headers); // p($message); echo "In this mail not send"; } // if your email succesfully sent ?> This is the mail that is sent: \n"; $to = "[email protected]"; $subject = "Your confirmation link here"; $message = "Your Comfirmation link \r\n"; $message .="Click on this link to activate your account \r\n"; $message .="Dear Member,
"; $message .="You have just posted a new advertisement on" . SITE_NAMEONLY; $message .="The title for the advertisement is
"; $message .="" . $data . "
"; $message .="Please Click here to publish this advertisement"; $message .= $adv . "
"; $from = ADMIN_EMAIL; $sentmail = mail($to, $subject, $message, $headers); // p($message); echo "Mail send"; } // if your email succesfully sent ?> Thx.