Jump to content

php mail


mattsolomon

Recommended Posts

hello,

 

my website mail now seems to be going into "spam" the IP and URL are not blackisted i did a search but im just wondering is their anything wrong with my coding that could be causing this?

 

[note] it has only just starting going to spam.. week or so...

<? 
/**
* Mailer.php

class Mailer
{
   /**
    * sendWelcome - Sends a welcome message to the newly
    * registered user, also supplying the username and
    * password.
    */
   function sendWelcome($user, $email, $pass){
      $from = "From: ".EMAIL_FROM_NAME." <".EMAIL_FROM_ADDR.">";
      $subject = "Your Registration Details For StaceyXSolomon";
      $body = $user.",\n\n"
             ."Welcome! You've just registered to the Stacey Solomon VIP Site "
             ."with the following information:\n\n"
             ."Username: ".$user."\n"
             ."Password: ".$pass."\n\n"
             ."If you ever lose or forget your password, a new "
             ."password will be generated for you and sent to this "
             ."email address, if you would like to change your "
             ."email address you can do so by going to the "
             ."My Account tab in the VIP Suite.\n\n"
             ."StaceyXSolomon"
             ."Support: [email protected] \n"
             ."------------------------------------------- \n"
             ."Official Links: \n"
             ."Competitions: http://staceyxsolomon.com/Competitions  \n"
             ."Youtube: http://youtube.com/StaceyXSolomon/ \n"
             ."Twitter: http://twitter.com/5taceySolomon/  \n"
             ."Facebook: http://facebook.com/staceyxfactor/";

      return mail($email,$subject,$body,$from);
   }
   
   /**
    * sendNewPass - Sends the newly generated password
    * to the user's email address that was specified at
    * sign-up.
    */
   function sendNewPass($user, $email, $pass){
      $from = "From: ".EMAIL_FROM_NAME." <".EMAIL_FROM_ADDR.">";
      $subject = "Forgotten Password - StaceyXSolomon";
      $body = $user.",\n\n"
             ."We've generated a new password for you at your "
             ."request, you can use this new password with your "
             ."username to log in to Stacey Solomons's VIP Site.\n\n"
             ."Username: ".$user."\n"
             ."New Password: ".$pass."\n\n"
             ."It is recommended that you change your password "
             ."to something that is easier to remember, which "
             ."can be done by going to the My Account page "
             ."after signing in.\n\n"
             ."StaceyXSolomon"
             ."Support: [email protected] \n"
             ."------------------------------------------- \n"
             ."Official Links: \n"
             ."Youtube: http://youtube.com/StaceyXSolomon/ \n"
             ."Twitter: http://twitter.com/5taceySolomon/  \n"
             ."Facebook: http://facebook.com/staceyxfactor/";

             
      return mail($email,$subject,$body,$from);
   }
};

/* Initialize mailer object */
$mailer = new Mailer;

?>

 

Link to comment
https://forums.phpfreaks.com/topic/228839-php-mail/
Share on other sites

oh aswell here are my email constants:

 

 

/**

* Email Constants - these specify what goes in

* the from field in the emails that the script

* sends to users, and whether to send a

* welcome email to newly registered users.

*/

define("EMAIL_FROM_NAME", "Stacey Solomon Official");

define("EMAIL_FROM_ADDR", "[email protected]");

define("EMAIL_WELCOME", true);

 

Link to comment
https://forums.phpfreaks.com/topic/228839-php-mail/#findComment-1179714
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.