| PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >> |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread |
|
|
#1 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Feb 2008
9 posts
Gave thanks: 0
Thanked 0 times
|
PHP mailing question
Hi everyone.
I've got what is probably an easily answered question, so I thought it better to ask here than get the help desk involved. I've installed Drupal on my site, and I've noticed that it doesn't seem to be sending out emails. I started looking into the cause of this with Drupal, and the general consensus there seems to be that there's some problem with my PHP setup that causes this. To test it out, I found this script online: PHP Code:
I'm starting to think there might be something wrong in my php.ini (I'm using this: http://surmunity.com/images/thephp5%21/php.ini) Anyone know if there's anything else I'm supposed to set up to make this work correctly? I've never really done anything with PHP, so I've got no idea how to configure the ini correctly. Thanks! |
|
|
|
|
|
#2 (permalink) |
|
URB4N 5K1LLZ
Super #1
Joined in Sep 2005
Lives in Orlando, FL
Hosted on SH63
2,656 posts
Gave thanks: 81
Thanked 128 times
|
I'm confused myself too. I've worked and edited a PHP mail form before, but not for Drupal. Is that the exact coding from Drupal, or something you added on your own? If anything I can give you a working PHP mail form with PHP and HTML included? Of course this is a last resort if someone else has the answer to this. =)
|
|
|
|
|
|
#3 (permalink) |
|
Surpass Fan
On a golden path...
Joined in Oct 2004
Lives in UK
356 posts
Gave thanks: 6
Thanked 13 times
|
I have seen it before where it php mail (not just in drupal) failed to send mail but only with a specific set of circumstances, which were that you were sending to more than one email address (cc/bcc did not matter) and if any account was on the same server then it failed for all.
eg. message to c d.com;e f.com.... will not be received if d.com or e.com are on the same server.
__________________
D17/D21/P59/P62/VPSX - "Faith can move mountains" (Faiths a big girl....) - I'm not paranoid, I know they are out to get me! |
|
|
|
|
|
#4 (permalink) |
|
Surpass Fan
On a golden path...
Joined in Oct 2004
Lives in UK
356 posts
Gave thanks: 6
Thanked 13 times
|
The method I use for mail is usually in the form;
// compile the email if (mail($mail_to, $mail_subject, $mail_message, $mail_header, "-f $mail_email")) { $email_sent=true; } else { $errors[] =$msg_mailserver; $email_sent=false; } } if (isset($errors)) { // if there were errors, list them
__________________
D17/D21/P59/P62/VPSX - "Faith can move mountains" (Faiths a big girl....) - I'm not paranoid, I know they are out to get me! |
|
|
|
|
|
#5 (permalink) |
|
URB4N 5K1LLZ
Super #1
Joined in Sep 2005
Lives in Orlando, FL
Hosted on SH63
2,656 posts
Gave thanks: 81
Thanked 128 times
|
I use this. For the PHP Code its:
PHP Code:
Code:
<form method="POST" action="mailer.php"> <INPUT TYPE="hidden" NAME="to" VALUE="youremailaddresshere"> <INPUT TYPE="hidden" name="subject" VALUE="Subject here"> <INPUT TYPE="hidden" NAME="form" VALUE="url for code"> <INPUT TYPE="hidden" NAME="admin" VALUE="your email address"> <INPUT TYPE="hidden" NAME="language" VALUE="en"> <p> Name:<br> <input type="text" name="name" value="" size=30> <br> Email:<br> <input type="text" name="email" value="" size=30> <br> Site Url:<br> <input type="text" name="url" value="" size=30> <br> Suggest a Tutorial:<br> <textarea name="message" rows="6" cols="40"></textarea> <br><br> <input type="submit" value="Submit" name="submit"> <input name="Clear" type="reset" value="Clear" /> </form> |
|
|
|
|
|
#6 (permalink) |
|
Surpass Developer
On a golden path...
Joined in Jan 2004
Lives in Florida
Hosted on decc.surpasshosting.com
493 posts
Gave thanks: 17
Thanked 76 times
|
EcrofirtIf your server is running Cpanel/WHM: Did you disable nobody emails from Tweak Settings? If you did, then they won't get sent. Also, check /var/log/exim_mainlog for the subject you are sending and see if you notice any entries. If there was an error, it should tell you in there Roxy, sanitize your inputs or I'm gonna spam the crap out of all of your forms ![]()
__________________
Mark Surpass Hosting Developer sɹnoʎ uɐɥʇ ɹǝʇʇǝq sı bıs ʎɯ |
|
|
|
|
|
#8 (permalink) | |
|
Registered User
Fresh Surpasser
Joined in Feb 2008
9 posts
Gave thanks: 0
Thanked 0 times
|
Sorry it's taken me a bit to get back to this thread. I've been very busy with work and haven't had a chance to make my way back here.
Roxy, to answer your question: When I went to Drupal's support forums regarding the issue, i found posts similiar to mine where people were given the text script I posted to test whether or not the mail() function was working on their server. Apparently Drupal uses PHP's mail() function to send out emails, which is why people are given the script I posted as a stand-alone test. I've noticed that I'm getting kickbacks at my admin email whenever I try to send a mail out with PHP. here's an example: Quote:
--- Mark: I've got a CPanel backend for my site, but I have no idea how to tweak my setup so I can disable nobody emails. If you can point me to where to check, though, I'll do that. Last edited by Ecrofirt; March 11th, 2008 at 12:52 PM. |
|
|
|
|
|
|
#9 (permalink) |
|
Surpass Developer
On a golden path...
Joined in Jan 2004
Lives in Florida
Hosted on decc.surpasshosting.com
493 posts
Gave thanks: 17
Thanked 76 times
|
Looks like yahoo might have blacklisted mail from sh136's ip. I will have one of the abuse team look into it. Yahoo tend to be a nazis when it comes to their block lists however
![]()
__________________
Mark Surpass Hosting Developer sɹnoʎ uɐɥʇ ɹǝʇʇǝq sı bıs ʎɯ |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|