Mass E-mail error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rick Horwitz
    Senior Member
    • Apr 2000
    • 361
    • 3.8.x

    Mass E-mail error

    Getting this error when trying to send e-mail to all my users.

    Parse error: parse error in /home/richard/public_html/forums/admin/email.php on line 143

    Any idea what may be causing it??

    Thanks,

    Rick


  • John
    Senior Member
    • Apr 2000
    • 4042

    #2
    This is probably because you are using " or \ in your email (perfectly reasonable). It will be fixed in an update that I will be doing later, but for now, you should put an extra \ before any \ or " that you have used.

    John
    John Percival

    Artificial intelligence usually beats real stupidity ;)

    Comment

    • WebStyles
      Senior Member
      • Apr 2000
      • 323

      #3
      I just got it too. The email I was sending out from is [email protected]. Also, I did a test yesterday (right after I saw this post actually ;)) sending with the exact same parameters, except instead of the newsletter I put in the message this time, I had "test", and it worked just fine.

      This is line 143:

      [code]eval("\$sendmessage = \"$message\";");[/code]

      Does it need an addslashes? I'm too scared to try... ;)
      We're Here Forums!
      [email protected]

      Comment

      • werehere
        Senior Member
        • Apr 2000
        • 1827

        #4
        This one is a confirmed bug, so it is being moved to the bugs forum.
        We're Here Forums!
        [email protected]

        Comment

        • John
          Senior Member
          • Apr 2000
          • 4042

          #5
          Yup...It is addslashes that is needed.

          Change line 135 onwards of email.php to this:

          [code]
          $messagetext=addslashes($message);

          $users=$DB_site->query("SELECT userid,username,password,email FROM user WHERE $condition AND userid>=$startat AND userid<$finishat AND adminemail=1 ORDER BY userid DESC");
          while ($user=$DB_site->fetch_array($users)) {

          $userid=$user[userid];
          $username=$user[username];
          $password=$user[password];
          $email=$user[email];

          eval("\$sendmessage = \"$messagetext\";");

          mail("\"$username\" <$email>",$subject,$sendmessage,"From: $from");

          echo "$user[userid]<br>\n";
          flush();

          }

          [/code]

          John
          John Percival

          Artificial intelligence usually beats real stupidity ;)

          Comment

          • Rick Horwitz
            Senior Member
            • Apr 2000
            • 361
            • 3.8.x

            #6
            Thanks for the code John it worked great!

            In fact I like the feature where you have to press a submit button to continue on to the next page of addresses. It gives the processor a chance to "cool off" between pages.



            [Edited by Rick Horwitz on 06-07-2000 at 03:12 AM]

            Comment

            • WebStyles
              Senior Member
              • Apr 2000
              • 323

              #7
              John,

              Your code took out the parse error, but unfortunately, we are We\'re Here Forums! again... :p

              I tried putting an htaccess in the admin directory turning magic_quotes_gpc off, but it didn't work.
              We're Here Forums!
              [email protected]

              Comment

              Related Topics

              Collapse

              Working...
              😀
              😂
              🥰
              😘
              🤢
              😎
              😞
              😡
              👍
              👎