| | |
mail function is not working properly???
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Feb 2009
Posts: 130
Reputation:
Solved Threads: 0
Hi everyone,
I am using a mail function in my contactus form. But for some id it is sending infromation of contac us form but some time it is not sending like on my gmail id i am not getting mail.
what is the reason behind this. I have tried every efforts.
I am using this code for mail function :-
in this when $mailto='myid@gmail.com';
i am using this is not working means i am not getting mail form contact us page.
Please help me . How i can solve this .
thanks,
gagan
I am using a mail function in my contactus form. But for some id it is sending infromation of contac us form but some time it is not sending like on my gmail id i am not getting mail.
what is the reason behind this. I have tried every efforts.
I am using this code for mail function :-
mail($mailto, $subject, $messageproper,"From: \"$fname\" <$email>" . $headersep . "Reply-To: \"$fname\" <$email>" . $headersep . "X-Mailer: chfeedback.php 2.07" ); in this when $mailto='myid@gmail.com';
i am using this is not working means i am not getting mail form contact us page.
Please help me . How i can solve this .
thanks,
gagan
Are you supplying a return e-mail registered to that domain? If not, some hosts block the mail, e.g. if your domain is www.example.com and your return address is me@jackspit.net, then the host may block it. They try to discourage spammers and jackers.
Last edited by ardav; May 14th, 2009 at 4:39 pm.
Dunna letta dem afool ya - duh reppa sistema is da evil. INDETERMINACY is alive anda wella - force a duh issue.
•
•
Join Date: Feb 2009
Posts: 130
Reputation:
Solved Threads: 0
hi,
Thanks for reply,
Sorry i am not understand about return email address about registered. So please explain me in brief. I have done every effort to solve this problem Still i am getting no mail from contact us form .
Please help me if there is any other mail function in PHP which i can use and which can solve my problem.
It is very urgent for me because my client is not getting mail and he is frustrating.
thanks
Thanks for reply,
Sorry i am not understand about return email address about registered. So please explain me in brief. I have done every effort to solve this problem Still i am getting no mail from contact us form .
Please help me if there is any other mail function in PHP which i can use and which can solve my problem.
It is very urgent for me because my client is not getting mail and he is frustrating.
thanks
Last edited by gagan22; May 15th, 2009 at 2:31 am.
•
•
Join Date: Apr 2009
Posts: 37
Reputation:
Solved Threads: 2
try this code
or check out
<URL SNIPPED>
php Syntax (Toggle Plain Text)
<!–p $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.”;?>
or check out
<URL SNIPPED>
Last edited by peter_budo; May 15th, 2009 at 7:31 am. Reason: Keep It Spam Free - Do not spam, advertise, plug your website, or engage in any other type of self promotion.
•
•
Join Date: Feb 2009
Posts: 130
Reputation:
Solved Threads: 0
hi,
I have tried this code . I am getting mail first time on my id after uploading this page . but after that when i fill contact us form 2nd time or 3rd time then mail is not coming on my id.
What can be the problem ??. I am not understanding. I am ubavke to find this problem. Please help me.
Thanks
I have tried this code . I am getting mail first time on my id after uploading this page . but after that when i fill contact us form 2nd time or 3rd time then mail is not coming on my id.
What can be the problem ??. I am not understanding. I am ubavke to find this problem. Please help me.
Thanks
•
•
Join Date: Feb 2009
Posts: 130
Reputation:
Solved Threads: 0
Hi everyone,
I am facing problem in mailer.php file. In this i am not getting mail from contact us form . Please help me . How i can solve this problem.
I am sending the code of mailer.php file . Please check this code. If you have any suggestions about changing this code. Then pls suggest me.
The code for mailer.php file is :
After submitting form it is going on thanks page but mail is not going on my email id .
What can be solution for this. Please help me.
Thanks,
I am facing problem in mailer.php file. In this i am not getting mail from contact us form . Please help me . How i can solve this problem.
I am sending the code of mailer.php file . Please check this code. If you have any suggestions about changing this code. Then pls suggest me.
The code for mailer.php file is :
<?php
$thankyouurl = "http://www.mysite.com/ThankYou.html" ;
$to = 'myemail-id@gmail.com' ;
$subject = "Quick Contact Form";
$name = $_POST['fname'] ;
$email = $_POST['email'] ;
$comments = $_POST['message'] ;
$cname = $_POST['cname'] ;
$add = $_POST['add'] ;
$telephone = $_POST['tnumber'] ;
$webadd = $_POST['webadd'] ;
$message =
"This message was sent from:\n" .
"$http_referrer\n" .
"------------------------------------------------------------\n" .
"Name of sender: $name\n" .
"Email of sender: $email\n" .
"Company Name of sender: $cname\n" .
"Address of sender: $add\n" .
"Telephone Number of sender: $telephone\n" ;
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers . = "From: $email"."\r\n";
mail($to,$subject,$message,$headers);
header( "Location: $thankyouurl" );
?>After submitting form it is going on thanks page but mail is not going on my email id .
What can be solution for this. Please help me.
Thanks,
Last edited by gagan22; May 15th, 2009 at 7:36 am.
hi the below works for gmail also
<?
$body.="<html><body><span>";
$body.="<br /><bHi GOD BLESS U</b><br />";
$body.="</span></body></html>";
$from=";//mail id
$replyto=$from;
$to="";//mail id
$toarr = explode(",",$to);
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1" . "\r\n";
if (strlen($body)>998) {
$headers .= "Content-Transfer-Encoding: base64;" . "\r\n";
$body=rtrim(chunk_split(base64_encode($body)));
}
$headers .= 'From: ' . $from . "\r\n" .
'Reply-To: ' . $replyto . "\r\n" .
'X-Mailer: PHP/' . phpversion();
foreach($toarr as $key => $value){
if (strlen($value) > 0) {
if (mail($value, $sub, $body, $headers)) {
$mailsentto .= "Mail sent to : ".$value."<br />";
} else $mailsentto .= "Error when sending Mail to ".$value."<br />";
}
}
?>•
•
Join Date: Feb 2009
Posts: 130
Reputation:
Solved Threads: 0
hi,
Thanks for reply,
I have used this code in my mailer.php file. But when i am printing value $mailsentto.
Then this is showing this output:
Error when sending Mail to myid@gmail.com
I do not know why this is going. Why mail is not going on mail id.
Please help me to solve this issue.
Thanks
Thanks for reply,
I have used this code in my mailer.php file. But when i am printing value $mailsentto.
Then this is showing this output:
Error when sending Mail to myid@gmail.com
I do not know why this is going. Why mail is not going on mail id.
Please help me to solve this issue.
Thanks
Have you tried commenting out your original code and replacing it with a hard-coded version?
does this work?
PHP Syntax (Toggle Plain Text)
$sendmail = mail('nobody@yoursite.com', 'hello', 'hello world this is a message', 'From: webmaster@example.com' . "\r\n" . 'Reply-To: webmaster@mysite.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion());
Dunna letta dem afool ya - duh reppa sistema is da evil. INDETERMINACY is alive anda wella - force a duh issue.
•
•
Join Date: Feb 2009
Posts: 130
Reputation:
Solved Threads: 0
thanks for reply,
yes i have tried like as you give me code. but after mail is not going.
I have put this mail function in many website. But i am not getting where the problem is coming.
But it seeming this problem can be from server or hosting side. If yes, Please suggest me . What Problem can be from server or our hosting site. So I can tell them that where is the problem.
Thanks
gagan
yes i have tried like as you give me code. but after mail is not going.
I have put this mail function in many website. But i am not getting where the problem is coming.
But it seeming this problem can be from server or hosting side. If yes, Please suggest me . What Problem can be from server or our hosting site. So I can tell them that where is the problem.
Thanks
gagan
![]() |
Similar Threads
- Windows firewall not working properly (Windows Software)
- Mail function (PHP)
- Problems with PHP mail function. (PHP)
- how do you setup php mail()? using sendmail and yellowdog linux w/apache and php4 (*nix Software)
- tryAgain function not working properly! (C++)
- my php session_destroy() function not working (PHP)
- Stuck on Mail() Function (PHP)
- Intel D815EEA PCI cards are not working properly (Windows NT / 2000 / XP)
Other Threads in the PHP Forum
- Previous Thread: show color on table if a user select a seat?
- Next Thread: My little php problem
| Thread Tools | Search this Thread |
# 5.2.10 ajax apache api array beginner binary broken cakephp checkbox class clean clients cms code cron curl database date display dissertation dynamic echo echo$_get[x]changingitintovariable... email error file files folder form forms function functions google href htaccess html image images include insert integration ip java javascript joomla ldap legislation limit link local login loop mail memberships menu mlm multiple multipletables mysql mysqlquery oop open paypal pdf persist php problem query radio random recursion regex remote rss script search server sessions sms soap sockets source space spam sql syntax system table tutorial update upload url validator variable video web xml youtube






