Help me in sending Email

Discussion in 'Scripts, 3rd Party Apps, and Programming' started by Nahid_hossain, Oct 22, 2008.

  1. Nahid_hossain

    Nahid_hossain New Member

    Hello I wrote a php script that sends email but the problem is that the email goes to spam folder. Please help me sending email directly in inbox.



    # -=-=-=- MIME BOUNDARY

    $mime_boundary $sitename.md5(time());

    # -=-=-=- MAIL HEADERS

    $to $email;
    $subject $subj;

    $headers "From: ".$sitename." Email <users@".$sitename.">\n";
    $headers .= "Reply-To: <".$semail.">\n";
    $headers .= "MIME-Version: 1.0\n";
    $headers .= "Content-Type: multipart/alternative; boundary=\"$mime_boundary\"\n";

    # -=-=-=- HTML EMAIL PART

    $message .= "--$mime_boundary\n";
    $message .= "Content-Type: text/html; charset=UTF-8\n";
    $message .= "Content-Transfer-Encoding: 8bit\n\n";

    $message .= "<html>\n";
    $message .= "<body style=\"font-family:Comic Sans Ms, Verdana, Geneva, sans-serif; font-size:14px; color:#666666;\">\n";
    $message .= $msg;
    $message .= "<br>\n\n";
    $message .= "<br>\n";
    $message .= "<br>\n\n";
    $message .= "<br>\n\n";
    $message .= "<br>\n\n";
    $message .= "<div style=\"color:blue; font-family: Arial, Tahoma; font-size: 90%;\">This mail is sent by a user known as from mobile community<br/>";
    $message .= "You can join this community and keep in touch by registering here <a href=\"\"></a><br/>";
    $message .= "</body>\n";
    $message .= "</html>\n";

    # -=-=-=- FINAL BOUNDARY

    $message .= "--$mime_boundary--\n\n";

    # -=-=-=- SEND MAIL

    $mail_sent = @mail$to$subject$message$headers );
    $mail_sent "Mail has been sent to destination<br/>" "Mail sending failed, Try again later<br/>";


    Last edited: Oct 22, 2008
  2. xPlozion

    xPlozion New Member

    take a look at . there's some information in there about how to avoid being placed into the spam filters, but it's not full-proof...
    Last edited: Oct 23, 2008

Share This Page