Jump to content

Mail Setup


Guest Propaganistas

Recommended Posts

Guest Propaganistas

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Guest Propaganistas
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:

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