Jump to content

[Answered] Php Mail: Johnny


EliteDeeds

Recommended Posts

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

Link to comment
Share on other sites

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>";
}
?>

Link to comment
Share on other sites

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.   Paste as plain text instead

  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...