News:

Join the Facebook Fan Page.

Main Menu

Registration emails

Started by treehugger, October 28, 2010, 08:15:13 AM

Previous topic - Next topic

treehugger

Using SMF2.0 RC3

Nothing is being sent after a member registers. I've tried setting up a new account, approving it and choosing Approve and require activation and also by choosing Approve and send email - but nothing comes through.

It's a small site so it's not that we're overloading the system!

I ran the script from another thread:
<?php
$email 
'[email protected]';


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 
'Second 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['error_occured'], ($txt['msg_alert_you_have'] . ' ' $txt['msg_alert_none'])))
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';
?>



this was the result - can anyone explain what it means please?

First Mail Results: We sent the email
Second Mail Results: We sent the email

Warning: require_once(Settings.php) [function.require-once]: failed to open stream: No such file or directory in /home/xxxxxxxx/public_html/email.php on line 28

Fatal error: require_once() [function.require]: Failed opening required 'Settings.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxxxxxxx/public_html/email.php on line 28

xenovanis

Line 28  ???

What's on line 28 of your Settings.php? (if any passwords, please don't post that part)

Are you sure, the webmasters email set in Admin -> Server Settings -> General, is a valid one?
"Insanity: doing the same thing over and over again and expecting different results."

treehugger

Thanks for your reply Xenovanis.

Line 28 of Settings.php is just
$maintenance = 0;      # Set to 1 to enable Maintenance Mode, 2 to make the forum untouchable. (you'll have to make it 0 again manually!)

The email address is just [email protected]. I did notice when I was looking in settings.php in the Forum Info section that $webmaster_email = '[email protected]';

Both address are valid but I've changed username@ to admin@ and tried registering a new account with a spare email address but nothing has come through other than the notification that a new member had registered.

xenovanis

Did you upload that script to your forum folder? The errormessages indicate that it was run from another location.

Do other notifications, like topicnotifications or mails for new personal messages come through?
"Insanity: doing the same thing over and over again and expecting different results."

treehugger

Sorry it's taken so long to reply to this Xenovanis.

No I put the script in the root directory which is what the other thread said to do.

I've just tried it in the forum directory and got all 3 emails:
First Test in testing
Second Test
An Error Has Occurred!   message = you have No messages...

So I tried registering again - and it worked! The message telling me to click the link to activate the account came through. :)

treehugger

I spoke too soon. :-[

The messages came through telling me as admin that a new member had joined and as the new member telling me that my registration request had been received and would be reviewed.

I approved the profile and required activation - but nothing else has come through to the 'new member'. Any ideas please?

xenovanis

You might want to check with your member or your host to see if none of these mails are caught by some anti spam measurement. The fact that some emails get send, implicates there's nothing wrong with the mailing system.

In addition, in a previous topic we discovered that some mails were blocked by spamfilters due to the wording of the subject. You might want to try changing that. I believe it's this template that is send after the approval.

/Themes/default/languages/EmailTemplates.english.php

'admin_approve_accept' => array(
/*
@additional_params: admin_approve_accept
NAME: The display name of the member.
USERNAME: The user name for the member receiving the email.
PROFILELINK: The URL of the profile page.
FORGOTPASSWORDLINK: The URL of the "forgot password" page.
@description:
*/
'subject' => 'Welcome to {FORUMNAME}',
'body' => 'Welcome, {NAME}!

Your account has been activated manually by the admin and you can now login and post. Your username is: {USERNAME}. If you forget your password, you can change it at {FORGOTPASSWORDLINK}.
"Insanity: doing the same thing over and over again and expecting different results."

treehugger

Thanks Xenovanis, it's sorted now. :)

jmille44

treehugger, I have the same problem.  No activation emails are being sent out or received.

Can you explain how you solved your problem?

Thanks!

Advertisement: