mailing problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
maheshkumar
Forum Newbie
Posts: 10
Joined: Tue May 06, 2008 4:34 am

mailing problem

Post by maheshkumar »

Everah | Please use bbCode tags for code when posting code in the forums.

Hi,

i am using php mail code to send the mail.following is the code:

Code: Select all

 
<?php
$to =   'maheshkumar.davuluri@bipsum.com';
$subject =  $_POST['txtSub'];
$name = $_POST['txtName'];
$com =  $_POST['txtCom'];
$email= $_POST['txtEmail'];
$city = $_POST['txtCity'];
$con =  $_POST['txtContry'];
$ph1 =  $_POST['txtPh1'];
$ph2 =  $_POST['txtPh2'];
$comm = $_POST['txtAr'];
$message =  "---------------------------\n".
            "----Sender's detail's------\n".
            "Name of the Sender : $name\n".
            "Company Name       : $com\n".
            "Email Id is        : $email\n".
            "City               : $city\n".
            "Country            : $con\n".
            "Contact number     : code-$ph1 , number-$ph2\n".
            "-----Comment's------------\n".
            "$comm\n".
            "--------------------------\n";
  mail($to,$subject,$message,$headers);
  header("Location:http://www.bipsum.com/thankyou.html");
  exit;?>
it works fine for the mail id's like yahoo,gmail,rediff,... but it is not working for the mail id of my company, like maheshkumar.davuluri@bipsum.com.
can any body please help me in this regard.

thanks in advance
Last edited by RobertGonzalez on Sat May 10, 2008 12:29 pm, edited 1 time in total.
Reason: Fixed no bbcode tag problem
[]InTeR[]
Forum Regular
Posts: 416
Joined: Thu Apr 24, 2003 6:51 am
Location: The Netherlands

Re: mailing problem

Post by []InTeR[] »

Maybe your mailserver in the php.ini doesnt allow relaying to the domain of your company.
maheshkumar
Forum Newbie
Posts: 10
Joined: Tue May 06, 2008 4:34 am

Re: mailing problem

Post by maheshkumar »

thanks for ur reply. I use 'ftp' to upload the code not the localhost to send mail. Therefore i think there is no need bother about php.ini file.

cheerrsss... :!:
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: mailing problem

Post by RobertGonzalez »

What mail server are you using? Are you sending appropriate headers? What are the spam rules on the mail server?
maheshkumar
Forum Newbie
Posts: 10
Joined: Tue May 06, 2008 4:34 am

Re: mailing problem

Post by maheshkumar »

hi Mr. Modnificent,
plz check the following link for information: http://www.bipsum.com/phpinfo.php. Hope it gives full information to you.
thanks...
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: mailing problem

Post by RobertGonzalez »

So are you saying that mails sent from the web app on your server are not being allowed into your mailboxes that are on the same domain?
maheshkumar
Forum Newbie
Posts: 10
Joined: Tue May 06, 2008 4:34 am

Re: mailing problem

Post by maheshkumar »

hi Mr. Modnificent,

Yes, exactly that is what is my problem. I need to upload the web application with php script in 'ftp'. mail works perfectly with yahoomail,gmail,e.t.c., but it is unable to send it to its own id which is bipsum id. provided there r no errors in sending the mail but not appears neither in the inbox nor spam.

thanks...
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: mailing problem

Post by RobertGonzalez »

FTP has nothing to do with this at all. If the script is working to send emails to Yahoo and Gmail and those mails are making it through then their is more than likely a problem with you spam rules on the mail server.
maheshkumar
Forum Newbie
Posts: 10
Joined: Tue May 06, 2008 4:34 am

Re: mailing problem

Post by maheshkumar »

ok. can you guide me please how to check spam rules on my mail server, coz i'm only a programmer here. thanks.....
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: mailing problem

Post by RobertGonzalez »

Talk to your network administrator or the person in charge of managing your network/servers. They will know.
JacobT
Forum Commoner
Posts: 43
Joined: Tue May 13, 2008 11:07 am
Location: Los Angeles, CA

Re: mailing problem

Post by JacobT »

maheshkumar, I've had a similar problem and I don't know if this is what's happening to you, but if your mail server is NOT the same server as your webhost, if your mail daemon is still turned ON on the webhost server, it'll capture any outgoing mail to the webhost domain because it tries to deliver it internally.

We have a mail server in our office, but our webhost has a Plesk control panel that we had to log into and turn off the mail services. Once we did that, all mail to our domain went through fine.

Hope this helps!
maheshkumar
Forum Newbie
Posts: 10
Joined: Tue May 06, 2008 4:34 am

Re: mailing problem

Post by maheshkumar »

hi Mr. JacobT,

ok i will try to follow same and get back to you. thank you for your suggestion.

cheers....
Post Reply