SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member MikeFoss18's Avatar
    Join Date
    Sep 2003
    Location
    Milford
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Registrations not going - mail() problem

    So here's the problem:

    I've got a registration page on my site. There is a development machine running php 4.3.4 on WindowsXP, and a production machine running the same on RedHat Linux somewhere on Hostway's hosting company. I have a registration page where after users enter registration information, they are immediately logged in, their information is stored in a MySQL database, and they are redirected to an email page. On the email page, an email containing all registration information (via GET variables) are emailed to the webmaster of the site and the user is redirected to their account page.

    On the XP machine, everything works fine, with email being received almost immediately. On the Linux box, however, there are occasions where the email is not sent. The funny part is, the MySQL data is stored (which is the step right before the email) and the user is redirected to their account page (which is the step right after the email). The only way you'd know anything went wrong was that the email wasn't sent.

    I have tried over and over again to duplicate the problem on the XP box, but to no avail. I even have a test machine, another RedHat box, which is meant to duplicate the one on Hostway. Again, no problems seem to be coming from there either. Is there a problem with mailing from across a 56k connection?

  2. #2
    This is all Mumbo Jumbo Amit's Avatar
    Join Date
    Oct 2001
    Location
    New Delhi, India
    Posts
    277
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First off check which method is beight used on the Linux machine for the email, i.e whether Sendmail/Qmail or SMTP (or even whether it has been properly set). You can check this by making a small phpinfo.php file with the following contents:

    PHP Code:
    <?php phpinfo(); ?>
    If mail is set properly, make sure you are not using the names and additional characters to form the email address, in the From and to Address.

    For e.g. don't use "Amit <amit@amit.com>" as the from or to email address. Just use "amit@amit.com". Becuase in certain setups, the mail() function would just not send this email.

    HTH!

  3. #3
    SitePoint Member MikeFoss18's Avatar
    Join Date
    Sep 2003
    Location
    Milford
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thx, but no go. I may have forgotten to mention that this problem began to occur when I installed SSL. It only seems to occur in the SSL portion of the site.

    The mailling program is sendmail, and it works fine for non-SSL areas, and even for the SSL-enabled area for the shopping cart (knock on wood).

    As for the To: and From: fields, the To: is a standard email address, and the From: is whatever the user enters - the funny thing is, I've gotten some of the most normal addresses (johndoe@somewhere.com) and they still wouldn't send.

  4. #4
    This is all Mumbo Jumbo Amit's Avatar
    Join Date
    Oct 2001
    Location
    New Delhi, India
    Posts
    277
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is your site using sessions or cookies ? Is your (program) logic dependant on them, then check whether they are being saved/retrieved or not ?

    Also some code snippet might help!

  5. #5
    SitePoint Member MikeFoss18's Avatar
    Join Date
    Sep 2003
    Location
    Milford
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's the snippit that you wanted:

    PHP Code:
     <?php /* Certain code removed to prevent copyright infringement */ ?>
    Yes, unfortunately I cannot reveal any of the code I create. Ce la vie...

    After , it turns out that I have been receiving the emails - on about a twelve hour delay. This most likely is the result of the web server or the mail server; either way, I can clearly pin the problem on Hostway's incompatence (pardon the pent-up anger, I've not had good experiences with them for months).


    Thanks for all your help though!

  6. #6
    This is all Mumbo Jumbo Amit's Avatar
    Join Date
    Oct 2001
    Location
    New Delhi, India
    Posts
    277
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anytime ...


Bookmarks

Posting Permissions

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