Jump to content

Help with email function!


nick_whitmarsh

Recommended Posts

Hi all,

 

I am trying to write a simple feebback form. It all appears to work apart from it does not send an email.

<?php
	$username = $_POST['username'];
	$useraddr = $_POST['useraddr'];
	$comments = $_POST['comments'];


	$to = "e9098022@bournemouth.ac.uk";
	$re = "Website Feedback";
	$msg = $comments;
	mail( $to, $re, $msg );
?>

<html>
<head><title>Message Received</title></head>
<body>
<h3>Thanks for your comments</h3>
Message received from <?php echo ( $username ); ?>
<br />
Reply to <?php echo( $useraddr ); ?>
</body>
</html>

 

; For Win32 only.

SMTP = smtp@hotmail.com

smtp_port = 25

 

; For Win32 only.

sendmail_from = readingfc_fan@hotmail.com

 

I have also put my php.ini code, could anyone please help me.

 

Nick

Link to comment
Share on other sites

I don't know much about how do you configure the mail() function, but let's try something else before- adding a from header:

 

<?php

if(!mail( $to, $re, $msg, "From: readingfc_fan@hotmail.com" ))
  echo "PHP problem";
else
  echo "Problem with your spam filter probably...";

?>

 

Is it still giving you "PHP problem"?

 

Orio.

Link to comment
Share on other sites

I dont think you can use hotmail anymore to do this not sure look it up on google.

 

your best bet is to setup the email as the email you was given from your isp ok hot mail see all mail as spam and blocks this ok.

 

 

example[mail function]

; Setup for Windows systems

SMTP = smtp.my.isp.net

sendmail_from = me@myserver.com

 

read this please

 

http://www.sitepoint.com/article/advanced-email-php

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.