Article

  • 10 years

    5 months

    YetiShare / Core

    6325

Emails are not being sent when a user registers on the site or when the contact form is submitted

Problem

When a user registers on the site they see the confirmation screen however they never receive an email with their password in it.

Fix

This is due to a number of reasons, try each of the following in order:

1) Test a registration yourself and ensure the email isn't being sent to a spam folder. If it is being spammed or if AOL/Hotmail accounts are not receiving emails, ensure you have SPF records setup for your domain. Your host or system admin can enable this.

2) There are 2 methods the script uses to send email, PHP and SMTP. The default is PHP. Sometimes web hosts block PHP from sending to stop spam scripts from running so although PHP attempts to send the email, it doesn't actually go anywhere. If this is the case switch to SMTP sending via the admin area, site settings. (below)

Set the options as shown above but replace with your own SMTP email settings. Your web host will be able to confirm these.

3) If the above doesn't work you can test SMTP sending for any errors. To test:

  • Login to your /admin area
  • Go to the "test tools" section, you can search for this in the top-left
  • Click on the "Email" button
  • Enter your email address and click "Send Test Email"
  • You should see the result on screen and receive a test email


Other Options

  • If you have a brand new server you can install sendmail so the 'php' method above works, although some hosts may still treat it as spam. To install sendmail via yum:
yum install sendmail
  • Test email sending is working by doing this via SSH:
echo "Subject: test" | sendmail -v [email protected]

Office 365

Sending via Office 365 requires TLS to be enabled.

In \core\includes\email_class\class.phpmailer.php, find:

public $SMTPSecure    = '';

Replace with:

public $SMTPSecure    = 'tls';

Save and upload to your install.