PHP Sendmail Problem

Please report bugs here!

Moderator: Thorsten

Post Reply
aeroman10
Posts: 7
Joined: Thu Jul 10, 2003 6:47 am

PHP Sendmail Problem

Post by aeroman10 »

I tried using the Contact Me function and although after clicking Submit I get a message that the email was sent, I never receive anything. I checked with my host and they say that I should check that the proper php sendmail path is set. My php sendmail path is: /usr/sbin/sendmail -t -i .... where would I set that setting in the script configuration so that the email forms would work.

Thank you.
Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

did you changed the e-mail adress in the configuration? The e-mail adress in the configuration is the adress, where all the mails go to.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
aeroman10
Posts: 7
Joined: Thu Jul 10, 2003 6:47 am

Post by aeroman10 »

Hello,
Yes, I changed my email address in the configuration but it still doesnt work. I emailed my webhost and here is what they said:
A: Its the way the mail() function is used. Any PHP page that uses the mail() function should use the mail function with a sendmail flag. For example, a mail() function that is normally used like this:

mail( $mailto, $mailsubj, $mailmsg, $mailheader );

should in fact be used like this:

mail( $mailto, $mailsubj, $mailmsg, $mailheader, "-fyou@yoursite.com");

Note the sendmail flag at the end of the function "-f" followed by the e-mail address mail is sending from.
I then went to sendmail.php and edited the mail() line under If and Else like this:
mail($adminmail, "Feedback: ".$title, stripslashes($_REQUEST["question"]), "From: ".$_REQUEST["email"], "-fmyemail@mydomain.com");
And now php mail function works great. Is there any other place I need to edit the mail() code other than sendmail.php?
Could this be addressed in the future releases?


Also in the future versions, is it possible to incorporate support for SMTP

By the way, I really like your FAQ script. Good work.

Thank you
Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

you'll have to edit save.php and mailsend2friend.php, too. I have noted your bug and I'll fix it with the next version.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
aeroman10
Posts: 7
Joined: Thu Jul 10, 2003 6:47 am

Post by aeroman10 »

I made all the changes. Everything works ok now.
Thank you for your help and for noting this issue.

Steve
http://www.webzila.com
Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi Steve,

okay! :)

Thanks for using phpMyFAQ!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
chester
Posts: 2
Joined: Wed Aug 20, 2003 6:43 pm

Post by chester »

Hi there,

well I tried all of the above, but still no e-mail. I currently running your 1.3.5. version but I'm not able to receive any mail.

What more should I try and check? The mail address is not the address of the domain phpmyfaq is on, that shouldn't be a problem should it?

Maybe an easier way of 'fixing' things is telling me how to get the contact section out of it anyway, since I don't really want them to use it ;)

Thanks for looking into this...
Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi chester,

just remove in the template file index.html this variable: {msgContact}
Then the contact link is hidden.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
chester
Posts: 2
Joined: Wed Aug 20, 2003 6:43 pm

Post by chester »

Thanks!

btw...any chance on a fix for the next release?
Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi chester,

is it possible for me to see you PHP configuration? Could you write a file with the following content:

Code: Select all

<?php phpinfo(); ?>
Then send post the URL of this file.

Thanks!

Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply