Announcement

Collapse
No announcement yet.

Small Mail Problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Small Mail Problem

    When a user has the email on reply option checked, some email addresses bounce that email from the forum back to the designated address in php.ini

    Both the SMTP and account information is setup correctly within php.ini.
    It's only a few addresses. Only thing is, when I send them mail through the same exact account assigned in php.ini (obviously through the same SMTP server) it goes through fine.

    Anyone?
    http://www.arc2055.com/misc/banner.jpg

  • #2
    Update info.

    The mails bounced back to me carry links (not every one of them, I haven't checked them) to this page: http://cr.yp.to/docs/smtplf.html

    Something about bare linefeeds within the email. If you read the document, it'll explain it.

    It seems that however vBulletin is sending the emails out, it's violating that bare linefeed rule. This obviously can't be the SMTP server's fault since I sent a normal email through the same server to the same address without any bounce backs.

    Can someone please take a look at this problem, thanks.
    http://www.arc2055.com/misc/banner.jpg

    Comment


    • #3
      It's a very extensive change, but it is something we will be looking into in the future.

      Comment


      • #4
        Just wondering though, is it a vBulletin code problem or is it my end?
        http://www.arc2055.com/misc/banner.jpg

        Comment


        • #5
          Ours I believe -- all our \r\n's are \n's after they go through CVS.

          Comment


          • #6
            Ok, just wanted to make sure it wasn't something I stupidly messed up lol. Will this be fixed on the next release? Thanks for the info and help btw.
            http://www.arc2055.com/misc/banner.jpg

            Comment


            • #7
              Bare Linefeeds...

              Ok. It's not quite efficient, but it does work... I ran this on our dev environment to send mail to a user whose email system had returned emails because of bare linefeeds.

              add the following lines above any call to mail(), replacing any of the variables here with the ones which will be sent out via email


              //Patching the bare linefeeds problem
              $parentemail = str_replace("\n","\r\n",$parentemail);
              $subject = str_replace("\n","\r\n", $subject);
              $message = str_replace("\n", "\r\n", $message);


              Also, modify the mail() call itself like the following.
              mail($parentemail,$subject,$message,"From: \"$bbtitle Mailer\" <$webmasteremail>\r\n");


              The tricky part is finding all points where mail() is called. I found the following places. *** Note: these are in our sources for 2.03, your mileage/lines may vary. ***

              member.php - lines 133, 436, 321, 1283
              register.php - 457, 473, 371,581
              report.php - 53
              db_mysql.php - 227
              user.php - 1191
              newreply.php - 203, 328
              newthread.php - 279
              private.php - 574, 618
              private2.php - 492, 524, 674, 747
              sendtofriend.php - 43
              mailtest.php - 12
              email.php - 130

              Good Luck...
              Kelly

              Comment


              • #8
                You could alternatively modify the email templates to contain those \r\n i.e.
                Code:
                Hello Jim,
                
                Welcome
                becomes:
                Code:
                Hello Jim,\r\n\r\nWelcome
                Not very pretty though
                Code:
                Hello Jim,\r
                \r
                Welcome
                May also work

                Comment


                • #9
                  I thought v2.2.0 would of fixed this. I'm not a big code person, are there any other ways other than actually having to edit the templates? Future releases that'll fix the problem maybe? Again, thanks for all the help guys.
                  http://www.arc2055.com/misc/banner.jpg

                  Comment


                  • #10
                    Still not patched...

                    2.2.1 has the same issue. I unfortunately completely forgot about having patched this before I upgraded

                    Ed and all, please don't forget about those of us with Windows mail servers in future versions.

                    Comment


                    • #11
                      Any update?

                      I'm getting a pretty large amount of bounces here due to this. Is the above fix the only one available atm? I havent upgraded to 2.2.6 yet so if its fixed there let me know as I didnt see it in the 2.2.6 announcement post. Thanks.

                      Comment


                      • #12
                        It can't be fixed by the team i think due to the CVS (Concurrent Version System) that is used to log changes to vBulletin automatically converts the \r\n to \n.
                        Scott MacVicar

                        My Blog | Twitter

                        Comment


                        • #13
                          Hrmm

                          Originally posted by PPN
                          It can't be fixed by the team i think due to the CVS (Concurrent Version System) that is used to log changes to vBulletin automatically converts the \r\n to \n.
                          Guess I try the fix above. Hopefully v3 will have a more reliable fix. Thanks.

                          Comment


                          • #14
                            Re: Bare Linefeeds...

                            Originally posted by merlin747
                            The tricky part is finding all points where mail() is called. I found the following places. *** Note: these are in our sources for 2.03, your mileage/lines may vary. ***
                            Update for the 2.2.5 sources. I found the mail() calls in the following locations.

                            file(line#):

                            mailtest.php(15):
                            member.php(398):
                            member.php(1423):
                            newreply.php(347):
                            newthread.php(297):
                            private.php(629):
                            private.php(675):
                            private2.php(539):
                            private2.php(571):
                            private2.php(730):
                            private2.php(804):
                            register.php(401):
                            sendtofriend.php(74)
                            email.php(148):
                            functions.php(2234):

                            Hope this helps.

                            Comment


                            • #15
                              Bare linefeed continued

                              I have made the above suggested changes to 2.2.6, but still get problems with some emails. The password notification is a prime suspect causing obvious problems.

                              I am convinced that the problem lays in the subject templates, as the preview of the email_lostpw template appears to have to have no formatting

                              ie

                              THIS

                              Hello,

                              You have requested to reset your password on $bbtitle forums because you have forgotten your password. If you did not request this, please ignore it. It will expire and become useless in 24 hours time.

                              To reset your password, please visit the following page:
                              $bburl/member.php?a=pwd&u=$user[userid]&i=$user[activationid]

                              When you visit that page, your password will be reset, and the new password will be emailed to you.

                              Your username is: $user[username]

                              To edit your profile, go to this page:
                              $bburl/member.php?action=editprofile

                              Yours,
                              $bbtitle team


                              BECOMES THIS

                              Hello, You have requested to reset your password on $bbtitle forums because you have forgotten your password. If you did not request this, please ignore it. It will expire and become useless in 24 hours time. To reset your password, please visit the following page: $bburl/member.php?a=pwd&u=$user[userid]&i=$user[activationid] When you visit that page, your password will be reset, and the new password will be emailed to you. Your username is: $user[username] To edit your profile, go to this page: $bburl/member.php?action=editprofile Yours, $bbtitle team

                              I am now going up the wall with this email bare linefeed problem, so any suggestions?

                              Adrian

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X