Closed Thread
Results 1 to 5 of 5

Thread: Problem with mail()

  1. #1
    aurisstudio36's Avatar
    aurisstudio36 is offline x10Hosting Member aurisstudio36 is an unknown quantity at this point
    Join Date
    Sep 2011
    Location
    India
    Posts
    9

    Unhappy Problem with mail()

    Hi there,

    I am having a strange problem... When ever i use the contact form on my site to send emails, everything works fine but i find a file named "-1" in my functions directory containing the emails address that were used by the mail() function.

    Is there any way i can stop this file from being created as it opens a great potential risk. This file contains email addresses of all visitors who send me their queries and this file is easily accessible.

    the form gets submitted to www.aurisstudio.com/system/somefile.php and after the email is sent, a file named -1 is created in the system directory and is easily accessed through www.aurisstudio.com/system/-1
    I tried to lock the directory but then the form cannot submit and generates a 403 error.

    I am anxiously waiting for your response. Thanks in advance.

  2. #2
    calistoy's Avatar
    calistoy is offline Free Support Volunteer calistoy is just really nice
    Join Date
    Aug 2008
    Location
    USA
    Posts
    5,598

    Re: Problem with mail()

    I clicked on your link to somefile.php and there's a 404 error saying that the file doesn't exist. What script are you using? Have you tried contacting the creator of your contact form script about this?

  3. #3
    aurisstudio36's Avatar
    aurisstudio36 is offline x10Hosting Member aurisstudio36 is an unknown quantity at this point
    Join Date
    Sep 2011
    Location
    India
    Posts
    9

    Re: Problem with mail()

    That link is an example...

    See, i own two sites, one is arshadansari.x10.mx and second is aurisstudio.com

    the contact form in arshadansari.x10.mx is submitted to aurisstudio.com and the email is also send and received in seconds.

    But then when i go to the link http://aurisstudio.com/system/-1 i find email addresses. The contact form is created by me using the simple php mail() function. you can visit the form at http://arshadansari.x10.mx/?t=contact

    Send a query and then check the link with -1 file... it would show your email address at the end... Thats the problem, how to stop the creation of this file?

  4. #4
    calistoy's Avatar
    calistoy is offline Free Support Volunteer calistoy is just really nice
    Join Date
    Aug 2008
    Location
    USA
    Posts
    5,598

    Re: Problem with mail()

    I see that your contact form also uses a separate php file that you've commanded it to send the message in your contact form code. Have you checked your code in that separate php file? I don't see how these txt files are being created unless you've told it to.

  5. #5
    aurisstudio36's Avatar
    aurisstudio36 is offline x10Hosting Member aurisstudio36 is an unknown quantity at this point
    Join Date
    Sep 2011
    Location
    India
    Posts
    9

    Cool Re: Problem with mail()

    Hi Thanks for the support...

    I believe that the problem was with the PHP's mail() function. I used the Mail Class from PEAR. It is working fine. No files with email Addresses. safe and secured!
    PEAR Mail is even better emailing system, so i am really happy with it.

    Thanks again

Closed Thread

Similar Threads

  1. getting problem with php mail
    By srsabariselvan in forum Free Hosting
    Replies: 0
    Last Post: 12-28-2010, 07:19 PM
  2. form mail problem - sends but can't receive mail
    By scotlundy in forum Free Hosting
    Replies: 0
    Last Post: 02-11-2010, 10:04 AM
  3. problem with mail()
    By anilson1 in forum Free Hosting
    Replies: 3
    Last Post: 09-24-2008, 08:46 PM
  4. php mail problem
    By claudioc in forum Free Hosting
    Replies: 3
    Last Post: 09-21-2007, 11:02 AM
  5. Mail Problem
    By ScienceComp314 in forum Free Hosting
    Replies: 8
    Last Post: 04-30-2005, 07:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers