Results 1 to 4 of 4

Thread: Getting blank emails using PHP mail ()

  1. #1
    Join Date
    Jun 2009
    Posts
    49

    Getting blank emails using PHP mail ()

    I have created a contact form in php. When I click on the send button, I am getting blank emails. The form works properly during form fill-up but fails at submission time. I tested the form on various computers but the result is same. Can you explain me why am I getting blank emails? I am using PHP mail ().

  2. #2
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Getting blank emails using PHP mail ()

    How did you defined mail() function? It seems to be declaration flaws. The correct syntax for defining mail() function is as below:

    PHP Code:
    mail($ destination_address@mail.com, $ subject, $ message, $ Fromsenders_address@mail.com); 

  3. #3
    Join Date
    May 2008
    Posts
    685

    Re: Getting blank emails using PHP mail ()

    Change your mail () as follows:

    PHP Code:
    <?php
    $to 
    'fellah@example.com';
    $subject 'test';
    $message "This is the test message";
    $headers 'From: techarena@example.com' "\r\n" .
        
    'Reply-To: techarena@example.com' "\r\n" .
        
    'X-Mailer: PHP/' phpversion();
    mail($to$subject$message$headers);
    ?>

  4. #4
    Join Date
    Nov 2008
    Posts
    1,192

    Re: Getting blank emails using PHP mail ()

    This is the first time I have seen this kind of problem. To be frank I really need your code in order to rectify your problem. I don't think this is just the problem with main() syntax. There is definitely something else which resulted you to have blank mails. Have you checked your code once to be sure if there is something missing. Did you received any error or warning message? Often people make mistakes while ending the statements. Check and reconfirm if this isn't causing the problem.

Similar Threads

  1. Opera mail keeps sending Emails
    By Prabhukumar in forum Portable Devices
    Replies: 6
    Last Post: 09-11-2011, 08:08 PM
  2. Blank emails in Outlook caused by Avast
    By Rucika in forum Networking & Security
    Replies: 8
    Last Post: 31-10-2011, 04:07 PM
  3. How can I fix blank emails on iPhone iOS 4
    By Micmac in forum Portable Devices
    Replies: 4
    Last Post: 30-08-2010, 12:51 PM
  4. Cannot delete emails in Windows Mail
    By rasena in forum Windows Vista Mail
    Replies: 2
    Last Post: 11-08-2010, 06:23 AM

Tags for this Thread

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
  •  
Page generated in 1,713,975,200.47816 seconds with 17 queries