Jump to content

PHP pipe to email and problems with extra bounce message


Eric!

Recommended Posts

My host has setup a pipe for an email address which sends a copy to a script.  Everything works fine, but despite all my efforts I keep getting a bounce email.  After researching this all over the web, I'm stuck.  Many people indicate that if the email server gets ANY kind of output back it generates a bounce error so they suggest using the -q option to supress the headers.

 

If I put this shebang at the top of the script:

#!/usr/bin/php

 

I get the following bounce message error:

 

A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:

 

  pipe to |/home/user1100/public_html/script/autorespond.php

    generated by test@domain.com

 

The following text was generated during the delivery attempt:

 

------ pipe to |/home/user1100/public_html/script/autorespond.php

      generated by test@domain.com ------

 

X-Powered-By: PHP/5.2.4

Content-type: text/html

 

------ This is a copy of the message, including all the headers. ------

[blah blah blah blah]

 

HOWEVER, If I put this shebang at the top of the script:

#!/usr/bin/php -q

 

I get this bounce message

A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:

 

  pipe to |/home/user1100/public_html/script/autorespond.php

    generated by test@domain.com

 

The following text was generated during the delivery attempt:

 

------ pipe to |/home/user1100/public_html/script/autorespond.php

      generated by test@domain.com ------

 

 

------ This is a copy of the message, including all the headers. ------

[blah blah blah blah]

 

So it seems the PHP info from the CLI is suppressed, but I still get a bounce.  Does anyone have some ideas of what I could try to debug this problem, or better yet fix it?

 

(note: i've changed the email addresses and paths slightly to foil spambots)

 

Link to comment
Share on other sites

My php.ini setting are this

--------------------------

[mail function]

; For Win32 only.

 

SMTP = mail.technology-uprising.com

smtp_port = 25

 

; For Win32 only.

sendmail_from = ahtasham82@gmail.com

 

And error is

 

not able to connect to mail server

 

 

please help me i want to send a simple email using php mail function

thanks

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.