Results 1 to 2 of 2

Thread: Help me in sending Email

  1. #1
    Nahid_hossain is offline x10Hosting Member
    Join Date
    Aug 2008
    Location
    Dhaka, Bangladesh
    Posts
    28

    Help me in sending Email

    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.

    PHP Code:

    {


               
                
    # -=-=-=- MIME BOUNDARY

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

                
    # -=-=-=- MAIL HEADERS

                
    $to $email;
                
    $subject $subj;

                
    $headers "From: ".$sitename." Email <users@".$sitename.">\n";
                
    $headers .= "Reply-To: [email protected] <".$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 7wap.mobi<br/>";
                
    $message .= "You can join this community and keep in touch by registering here <a href=\"http://7wap.mobi\">7wap.mobi</a><br/>";
                
    $message .= "</body>\n";
                
    $message .= "</html>\n";

                
    # -=-=-=- FINAL BOUNDARY

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

                
    # -=-=-=- SEND MAIL

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



          } 
    Last edited by Nahid_hossain; 10-22-2008 at 10:45 PM.

  2. #2
    xPlozion's Avatar
    xPlozion is offline x10 Elder
    Join Date
    Mar 2008
    Location
    Delaware, USA
    Posts
    868

    Re: Help me in sending Email

    take a look at http://www.php.net/mail . there's some information in there about how to avoid being placed into the spam filters, but it's not full-proof...
    Last edited by xPlozion; 10-22-2008 at 11:43 PM.

Similar Threads

  1. how to Sending a message to email through a button
    By anilson1 in forum Scripts, 3rd Party Apps, and Programming
    Replies: 4
    Last Post: 07-25-2008, 04:29 AM
  2. Sending Email
    By persiantnt in forum Free Hosting
    Replies: 0
    Last Post: 06-10-2008, 09:33 AM
  3. EMAIL Sending Problems
    By jeffpattyhertel in forum Free Hosting
    Replies: 8
    Last Post: 02-08-2008, 07:03 PM
  4. Forum: Problem in sending email
    By eronkid in forum Feedback and Suggestions
    Replies: 1
    Last Post: 10-19-2007, 08:07 AM
  5. Failed sending email PHP
    By N2PGames in forum Free Hosting
    Replies: 2
    Last Post: 06-18-2006, 06:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
dedicated servers