Forum Moderators: coopster

Message Too Old, No Replies

email script - line spacing / format

         

adammc

6:53 am on Sep 22, 2005 (gmt 0)

10+ Year Member



Hi,

The script that i bought that runs my jobsearch site has a built in email script that you can send an email to the jobseekers or the employers that are in the database.

The only problem is that the emails it sends out are all screwy :(

When i get a copy of the emails it has extra line breaks, sometimes 3 breaks, when in my text editor it only has one.

I have had emails from clients who said that the format was the complete oposite, that the whole email was one big paragraph!

can anyone help?


if($_POST[who] == 'jobseekers')
{
$q1 = "select job_seeker_email from job_seeker_info ";
$r1 = mysql_query($q1) or die(mysql_error());
}
elseif($_POST[who] == 'employers')
{
$q1 = "select CompanyEmail from job_employer_info ";
$r1 = mysql_query($q1) or die(mysql_error());
}

while($a1 = mysql_fetch_array($r1))
{
$from = "From: $contactemail";
mail($a1[0], $subject, $message, $from);
}
echo "<center><br><br><br>The mail was sent successfully. </center>";
unset($who);
exit;

dcrombie

1:02 pm on Sep 22, 2005 (gmt 0)



You're sending a plain-text email with HTML content. Of course the results are going to be screwey.

You should send _either_ plain text, or a proper HTML-formatted email with a plain text fall-back.

adammc

10:06 pm on Sep 22, 2005 (gmt 0)

10+ Year Member



Can you please tell me where can i find help on modifying this code?

dcrombie

8:47 am on Sep 23, 2005 (gmt 0)



I use this class for sending HTML emails: [phpmailer.sourceforge.net...]