Jump to content

Recommended Posts

Posted

User: Epicdeee

Server: Johnny

Site: epicdeeds.tk

 

Greetings, I am trying to use SMF's email function using PHP, and nothing seems to be going through. No new registration emails, and no direct emails from admin.

 

I ran a few tests on the server, and it's indicated that the mail funtion IS installed. Is there a reason I should not be sending emails out?

 

Below is a test script to test PHP email function. It does go to the 'email sent', however nothing shows up in my mail box. Yes, LOL, I checked my spam folder. :D

 

Thanks,

ED

<?php

$mail = mail("elitedeeds@outlook.com", "Test","Tester email", "From: Myself<elitedeeds@outlook.com");

if(!$mail){
echo 'mail is not sent!';
} else {
echo 'mail is sent :-)';
}

?>

 

This was in my server log.

[30-Oct-2013 14:11:54 America/Los_Angeles] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20090626/pdo_pgsql.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20090626/pdo_pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0

Posted

I just ran a test from my johnny account and received the email ok.

 

Try this and edit the whoevers.

 

<?php
$to	   = "whoever@gmail.com";
$subject  = "Test Email";
$message  = "Sending A Test Email.";
$headers  = "MIME-Version: 1.0\n";
$headers .= "Content-Type: text/plain; charset=iso-8859-1\n";
$headers .= "From: whoever@heliohost.org" . "\r\n" . "BCC: $maillist\n";
if (mail($to, $subject, $message, $headers)) {
echo "<br><p><b>Message successfully sent!</b></p><hr><br>";
echo "From: whoever<br>";
echo "To: Me<br>";
echo "Bcc: $bcc<br>";
echo "Subject: $subject<br>";
echo "Message: $message<br>";
exit;
} else {
echo "<p>Message delivery failed...</p>";
}
?>

Posted

Flawless!! Thanks a ton!! Everything is working as intended now, even emails sent from the forum. /does happy coder dance

 

Now, if we can just nix those darn 500 errors, we'd be set. ;)

 

Thanks again!!1

 

Elite Deeds

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...