Problems with email on NT servers

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ivo
    Member
    • Jun 2001
    • 49

    Problems with email on NT servers

    Hi all,

    My vB email fearures do not work. From the vB side everything seems to be OK (No error messages,"successfully sent"), but I never receive any of the mails.

    Here are a few parameters that might be helpful to know (?action=phpinfo?):

    -- vB 2.0
    -- PHP 4.0.5 on NT5.0 system
    -- safe_mode is OFF
    -- upload_tmp_dir is E:\PHP\uploadtemp
    -- sendmail_path has no value
    -- sendmail_from has correct email address
    -- SMTP is set to the correct ip address

    Any idea what I can do?

    Thanks in advance
  • Mike Sullivan
    Former vBulletin Developer
    • Apr 2000
    • 13327
    • 3.6.x

    #2
    Does your SMTP server have some sort of log you can look at that'll show it's status with specific messages?

    Comment

    • Ivo
      Member
      • Jun 2001
      • 49

      #3
      SMTP Server

      Mike, I'll try to get one from our provider.

      Meanwhile there is something I would like to know. I talked to several other people about that problem and we came to the conclusion, that vB possibly fails with a valid authentication on the SMTP server.
      I know that our server requires authentication on usual email because our SMTP server is not open.
      How does vB handle this? How does vB transmit authentication information to our SMTP server? May that be the root of our problem?

      Regards, Ivo
      Last edited by Ivo; Thu 19 Jul '01, 4:22am.

      Comment

      • Mike Sullivan
        Former vBulletin Developer
        • Apr 2000
        • 13327
        • 3.6.x

        #4
        We use PHP's mail() function, which uses whatever was set in your php.ini file. I haven't seen a space for validation in the php.ini.

        Comment

        • splooge
          Senior Member
          • Mar 2001
          • 215

          #5
          I had the same problem.

          I'm running Win2k advanced server. I would run the mailtest.php script, everything would work fine. Just the e-mail didn't show up.

          In php.ini, look for your smtp setting. It should set to 'localhost' by default. This won't work unless your vB box is running an SMTP server such as Exchange. (Virtual SMTP server don't cut it)

          It wasn't until I changed this setting from localhost to smtp.mailserver.com that my e-mail started working.

          Good luck.

          Comment

          • Ivo
            Member
            • Jun 2001
            • 49

            #6
            Originally posted by splooge


            It wasn't until I changed this setting from localhost to smtp.mailserver.com that my e-mail started working.

            Good luck.
            Thanks for the hint but Im afraid I can't do that because I have to share my php.ini with the other guys on our webserver. I have to use the IP address from our SMTP server (a different maschine).

            Any other idea?

            I also had a look at the log file on the SMTP server. No errors reported! Seems that the emails do not leave the forum area. Where do they go or have they really been sent to somewhere?

            Last edited by Ivo; Fri 27 Jul '01, 2:28am.

            Comment

            • Ivo
              Member
              • Jun 2001
              • 49

              #7
              sendtofriend works now??!!!

              I just received my first emails with this sendtofriend feature! But it's still very confusing.


              I changed the following in the sendtofriend.php3 file:

              Line 43:

              mail($sendtoemail,$emailsubject,$message,"From: \"$bbtitle Mailer\" <$webmasteremail>");

              to:

              mail($sendtoemail,$emailsubject,$emailmessage,"From: \"$bbtitle Mailer\" <$webmasteremail>");



              Now it works but only for this special function. All other email features still don't work.
              What happens here? What else do I have to modify to get the rest running???

              Any help is appreciated, cause I'm not a php specialist.
              Last edited by Ivo; Fri 27 Jul '01, 2:26am.

              Comment

              • Ivo
                Member
                • Jun 2001
                • 49

                #8
                I need help plz...

                Hi there, can please somebody help me with this issue...

                Anybody any ideas?

                Thanks in advance!

                Comment

                • Mike Sullivan
                  Former vBulletin Developer
                  • Apr 2000
                  • 13327
                  • 3.6.x

                  #9
                  Looks like a \n vs. \r\n issue.

                  In sendtofriend.php, find this line:

                  Code:
                  mail($sendtoemail,$emailsubject,$message,"From: \"$bbtitle Mailer\" <$webmasteremail>");
                  Above it, add this:

                  Code:
                  $message = str_replace("\n", "\r\n", $message);
                  And see if it works then.

                  Comment

                  • Ivo
                    Member
                    • Jun 2001
                    • 49

                    #10
                    OK, that one fixed it!

                    Thanks Mike, that additional line solved the email problem at least for this sendtofriend feature. I changed it back again to "$message", added your line and it still works.
                    What do I have to do to get the other mail features (subscribe, etc.) running as well?



                    Also, this sendtofriend link, which I receive in the mail points to a wrong URL. It points to:

                    "http://www.mydomain.com/showthread.php3?threadid=89&referrerid=4"

                    whereas it should point to:

                    "http://www.mydomain.com/re/la/tive/path/showthread.php3?s=&threadid=89&referrerid=4"

                    Any ideas?
                    Last edited by Ivo; Tue 31 Jul '01, 8:19am.

                    Comment

                    • Mike Sullivan
                      Former vBulletin Developer
                      • Apr 2000
                      • 13327
                      • 3.6.x

                      #11
                      What do I have to do to get the other mail features (subscribe, etc.) running as well?
                      Well, uhh, you basically have to do something similar for every other email function

                      I'm tempted to change all occurances of mail( with vbmail( and then define that function, but I need to do some more searching around to see if it'll find all mail calls.

                      Also, this sendtofriend link, which I receive in the mail points to a wrong URL
                      Check your BB URL in your CP's options.

                      Comment

                      • Ivo
                        Member
                        • Jun 2001
                        • 49

                        #12
                        I'm tempted to change all occurances of mail( with vbmail( and then define that function, but I need to do some more searching around to see if it'll find all mail calls.
                        I see. Well, that would be excellent!
                        Check your BB URL in your CP's options.
                        I checked that, works now!Thanks

                        Comment

                        • Mike Sullivan
                          Former vBulletin Developer
                          • Apr 2000
                          • 13327
                          • 3.6.x

                          #13
                          Ok, try this. Add this to the bottom of functions.php (just above the ?>):

                          Code:
                          function vbmail($email, $subject, $message, $options="") {
                            $message = str_replace("\n", "\r\n", $message);
                            return mail($email, $subject, $message, $options);
                          }
                          Then, replace every occurance of mail( or mail ( with vbmail( in all files (something like 24 occurances) *except* the occurance in db_mysql.php -- that you will have to manually fix.

                          Comment

                          • Steve.Slawson
                            New Member
                            • Jun 2001
                            • 3

                            #14
                            is there a solution to this issue

                            i have posted numerous times about not being ablt to send mail on a Win 2k server (that only has virtual SMTP server loaded) without finding the answer. If there is a solution please let me know.

                            [email protected]

                            Comment

                            • Ivo
                              Member
                              • Jun 2001
                              • 49

                              #15
                              That looks very good...

                              I've found 22 occurances without the one in db_mysql.php3. Email seems to be working now except the subscribe feature. I still do not get emails if there is a new thread in a subcribed forum.

                              Perhaps this is related to my next question:

                              Originally posted by Ed Sullivan
                              ... *except* the occurance in db_mysql.php -- that you will have to manually fix.
                              How do I manually fix this @email (...) in the db_mysql.php3 and is this related to my subscribe issue?


                              And another question:

                              What happens to my modifications if I update the forum to 2.0.3? Will they be lost then?


                              However, thanks a lot so far. That was a big step forward.

                              Comment

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