Email from website not received

Status
Not open for further replies.

imeonn

New Member
Messages
4
Reaction score
0
Points
1
Hi there,

I am having problems with emails from my site not being sent to my email address. I have searched the forums and learned that there shouldn't be any problems with it at all since php mail is working and the smtp issues on chopin (my server) have been resolved, so now I don't know where the problem is coming from.

I have a contact form on my wordpress blog which should send emails to me when completed, but it never has. I have also conducted several tests using standalone php forms but I never receive emails from them either; it would confirm the email has been sent but I am not receiving them. Additionally, I also tried changing my email recipients to see if it was an issue with the email hosts, but nothing worked (I tried using yahoo mail, gmail and hotmail).

The only setting I have changed on my email was the MX entry (directing it to googlemail apps: 1 ASPMX.L.GOOGLE.COM.), and even then, I can send and receive emails from my google-hosted email except mails from my website. I have also added a subdomain entry for my google apps page, which I don't think would affect it.

Kindly let me know if there's anything gone wrong with my setting to cause this. My website is http://www.im-eon.net and my email is noemi@im-eon.net

Thanks :)
 
Last edited:

jtwhite

Community Advocate
Community Support
Messages
1,381
Reaction score
30
Points
0
Are you trying to send emails through SMTP or the PHP mail function?
 

imeonn

New Member
Messages
4
Reaction score
0
Points
1
Could you copy and paste the malfunctioning code here?

I don't think it simply has to do with the code since I have tested several php forms, and my wordpress blog uses the cforms plugin which should be working through php mail alone (but doesn't). Nonetheless, here are some codes I used to test if contact emails sent from my site would be received in my mail:

html code:
Code:
<html>
<body>

<?php
if (isset($_REQUEST['email']))
//if "email" is filled out, send email
  {
  //send email
  $email = $_REQUEST['email'] ;
  $subject = $_REQUEST['subject'] ;
  $message = $_REQUEST['message'] ;
  mail( "myusername@mydomain.net", "Subject: $subject",
  $message, "From: $email" );
  echo "Thank you for using our mail form";
  }
else
//if "email" is not filled out, display the form
  {
  echo "<form method='post' action='mailform.php'>
  Email: <input name='email' type='text' /><br />
  Subject: <input name='subject' type='text' /><br />
  Message:<br />
  <textarea name='message' rows='15' cols='40'>
  </textarea><br />
  <input type='submit' />
  </form>";
  }
?>

</body>
</html>

mailform.php code:

Code:
<?php
$to = "myusername@mydomain.net";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "someonelse@example.com";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>

Please note that I copied this test code from w3schools and is not really my own. This is simply to test if the emails would send if another php form was used and not cforms.
Edit:
Are you trying to send emails through SMTP or the PHP mail function?

I'm using the PHP mail function (which as far as I know is enabled); PHP mail function should let the cforms plugin work on its own without having to opt for SMTP. Additionally, my test codes to see if the emails from my website can be received in my email use only the PHP mail function.
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Try:

PHP:
<?php

$to      = 'arealaddress@hotmail.com';
$subject = 'the subject';

$message = 'hello and how are you today on one very long and involve line that will now repeat itself
 hello and how are you today on one very long and involve line that will now repeat itself 
hello and how are you today on one very long and involve line that will now repeat itself ';

$headers = 'From: username@domainname.x10hosting.com' . "\r\n" .
    'Reply-To:  anotheraddress@hotmail.com' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);

echo "Done here." ;
?>
 
Status
Not open for further replies.
Top