Jump to content

Mail Setup


Guest Propaganistas

Recommended Posts

Guest Propaganistas
Posted

Hiya,

 

I'm setting up an SMF forum, but it seems I can't get the mail function working (both PHPmail and SMTP outgoing mail).

I've searched around on this forum, I did a quick search on Google, but everything I found didn't have any success.

 

These are the inputs I tried:

 

Server: mail.mydomain.co.cc ; mail.heliohost.org ; stevie.heliohost.org

Username: noreply+mydomain.co.cc

Port: 25

 

It's not the first time I configure SMF fora and it's mailsettings (using cPanel), so I guess there's something wrong with my internal mail setup?

 

Any support would be appreciated! :)

 

Thanks,

Propaganistas

 

PS: there are no mails in my spam folders.

PS2: there are no entries in cPanel's error log nor in SMF's error log.

Posted

You really shouldn't have to specify any of that stuff to get SMF able to email your users. It just needs to use PHP's mail() function, which is working fine.

 

What exactly is this function supposed to do? If it's just supposed to email users, I would suggest you contact the SMF folks and ask them how to get email working with just PHP's mail() function.

Guest Propaganistas
Posted
You really shouldn't have to specify any of that stuff to get SMF able to email your users. It just needs to use PHP's mail() function, which is working fine.

 

What exactly is this function supposed to do? If it's just supposed to email users, I would suggest you contact the SMF folks and ask them how to get email working with just PHP's mail() function.

 

I've ran a test script:

 

<?php
$email = 'myemail@mydomain.com';


global $context, $scripturl, $modSettings;

error_reporting(E_ALL);

echo 'First Mail Results: ';
// First test.. Direct email sending.
if(mail($email, 'First Test in testing', 'This is a test message does it get emailed?'))
echo 'We sent the email<br />';
else
echo 'We failed to send the email<br />';

// Second test.. Strings..

$subject = 'Second Test';
$msg = 'This is the message. Do we get it?';

echo 'Secon Mail Results: ';
if(mail($email, $subject, $msg))
echo 'We sent the email<br />';
else
echo 'We failed to send the email<br />';

// Third and final test.. Include strings to send.
require_once('Settings.php');
require_once($boarddir . '/Themes/default/languages/index.english.php');

echo 'Third Results: ';
if(mail($email, $txt['modify'], ($txt['save'])))
echo 'We sent the email<br />';
else
echo 'We failed to send the email<br />';

echo ' Now Check your inbox, spam or whereever for your mail';
?>

 

I received all three mails (sent by myaccountname@stevie.heliohost.org) immediately.

 

After some more SMF-mailing I think the problem resides at using self-defined domain addresses. (SMF's only required setting for PHP mail() is a valid domain mail address).

And as there are no mailerrors in SMF's error log, nor are there in cPanel's, sent mails get lost somewhere I think..

 

Kinda odd, don't you think? :huh:

Posted

Well, if you're sending mail() from an address that isn't actually yours, then SMF might be stopping you. Why not just use your standard domain?

Posted

You should be able to find working SMTP settings after creating an email from cPanel. All settings are specified there.

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