Exforsys

Online Training

problems using php mail function

This is a discussion on problems using php mail function within the PHP forums, part of the Programming Talk category; Hi, I was trying to write a php form to give users the possibility to send me feedbacks about my ...


Go Back   Exforsys > Programming Talk > PHP

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-25-2006, 11:11 AM
Junior Member
 
Join Date: Apr 2006
Posts: 21
falco85 is on a distinguished road
problems using php mail function

Hi,
I was trying to write a php form to give users the possibility to send me feedbacks about my site. In order to do this I am using the php mail function, but I cannot make it work. The code seems fine but I simply don't receive any email when testing it. The script was tested by a friend of mine as well but he can make it work. What's wrong with my site then? Thank you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-25-2006, 01:57 PM
iatbm's Avatar
Member
 
Join Date: Apr 2006
Posts: 51
iatbm is on a distinguished road
This will get you started. Explore a little bit !

http://www.buildwebsite4u.com/advanced/php.shtml
http://www.christian-web-masters.com...il-form-2.html

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-28-2006, 08:13 AM
Member
 
Join Date: Apr 2006
Posts: 50
mtajim is on a distinguished road
First See ur Server configuration whether Php mail function is enabled or not. The problem might be there
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-28-2006, 08:40 AM
Member
 
Join Date: Apr 2006
Posts: 85
cbdarts is an unknown quantity at this point
The biggest problem with this will be your outgoing Mail server. I recommend you test it on a different Host, or some one which has an outgoing (SMTP) server on the same server as the Web Server (IIS/Apache).

Thats what I do - btw heres my sample script.

Quote:
HTML Code:
<?
$recvmail="contact@cbdarts.com";
$subject="from".$_REQUEST['SenderName'];
$headers= "From:".$_REQUEST['SenderEmail']."\n";
$headers.='Content-type: text/html; charset=iso-8859-1';
mail($recvmail, $subject,  "
<html>
<head>
 <title>Contact letter</title>
</head>
<body>

<br>
  ".$_REQUEST['ContactDetails']."
</body>
</html>" , $headers);
echo ("Your message was successfully sent!");
?>
<script language="javascript">
	alert("Thank you for your comments. We will contact you shortly.");
	history.go(-1)
</script>
<center>
	<h1>Thank you for your comments. We will contact you shortly.</h1>
	<h3>Please click the back button on your browser to continue browsing our website.</h3>
	<input type="button" onclick="history.go(-1)" value="< Back"/>
</center>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 12-07-2006, 01:31 AM
Senior Member
 
Join Date: Apr 2006
Posts: 153
cyrus is on a distinguished road
falco85 is problem with mail solved. If so how resolved it.Kindly share it out in this discussion so that it would be useful for other members. If your problem is not yet resolved post the exact problem or code where you are facing the problem and we would try to resolve it out here.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 09-07-2007, 02:56 PM
Junior Member
 
Join Date: Sep 2007
Posts: 1
Jansen is on a distinguished road
I have the following problem;

My companies website (PHP on MySQL Server) uses the standard mail function to send email messages to a number of mail addresses. The emails sent to addresses with the same domain-part as the website do not arrive. Yet the emails to email addresses outside our domain do arrive.

Our hosting provider is unable to fix this. The obvious workaround by forwarding the received email from the address outside back to an address within our domain works. But is an eye sore in the architecture and I would love to resolve this.

Thoughts anyone? Any help is hugely appreciated.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-06-2008, 12:25 PM
Junior Member
 
Join Date: Apr 2008
Posts: 2
karan0786 is on a distinguished road
Question PHP form not working in gmail

Hello friend to discuss a problem with you all actually I am using one php feedback form in my site which is developed by one of my friend.But that is not working.Actually two of expierenced PHP developers have checked that form and they said that coding is 100% right.Actually it is not working with gmail and rediff and hotmail and in yahoo it is coming in bulk folder.I have tried other gmail addresses but it is not working in that just working in yahoo's bulk folder not coming in its inbox.I dont know what is the actual problem my friends are telling that ,that form is working right with them and theri gmail address.I have checked that form in two different servers of different hosting companies.but in both I am not getting mail.Can anyone please help me.Any help ????I will be really grateful to you.......Pleaseeeeee
Thanks in advance....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new questions
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Custom Error Pages with PHP and Apache techguru Unix Articles and Tutorials 0 08-29-2005 02:27 PM
Installing PHP under BadBlue Web Server techguru Unix Articles and Tutorials 0 08-27-2005 10:25 AM
Making the PostgreSQL and PHP Connection techguru Unix Articles and Tutorials 0 08-27-2005 12:24 AM
Required Web Defeloper - PHP hr_Joseph Experienced Job Seekers - India 0 05-26-2005 10:46 AM
2 -4 yrs experience, PHP Developer, MNC, Hyderabad srinu Experienced Job Seekers - India 0 05-20-2005 09:19 PM


All times are GMT -4. The time now is 07:15 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.