Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: metallicgloss on February 26, 2015, 11:05:48 AM

Title: Changing Default Email Address
Post by: metallicgloss on February 26, 2015, 11:05:48 AM
Hello,

I currently have an email address that is sending emails like activation emails, database warning emails but they all go straight to spam for me and other members.
How do I change it so it sends from an email address i already own and doesn't go to spam??
I have tried setting up the mail settings, the ones im editing can be found in Admin>Maintenance>Mail>Settings>Mail Type
Can someone help please.
Title: Re: Changing Default Email Address
Post by: Illori on February 26, 2015, 11:17:39 AM
admin -> server settings webmaster email address is where those emails go.
Title: Re: Changing Default Email Address
Post by: metallicgloss on February 27, 2015, 09:21:03 AM
Where would I find the server settings, I cannot find it. Is it under configuration??
Title: Re: Changing Default Email Address
Post by: Mortissimov on February 27, 2015, 10:07:11 AM
Administration Center » Server Settings » General

Here you can fint it. :)
Title: Re: Changing Default Email Address
Post by: metallicgloss on February 28, 2015, 04:34:34 PM
Ok, thank you. It is already set to my email address but the forums emails people using different email address.
Title: Re: Changing Default Email Address
Post by: margarett on February 28, 2015, 06:47:33 PM
Well, if you use PHP mail, it is likely that your server has a "predefined" email that overrides what you set in webmaster email...
Title: Re: Changing Default Email Address
Post by: metallicgloss on March 03, 2015, 08:30:34 AM
How would I remove that?
Title: Re: Changing Default Email Address
Post by: margarett on March 03, 2015, 09:24:11 AM
Is SMF sending the emails with the address you set or with any other?

Is the email you set from the same domain as yours? (eg: you domain is www.domain.com and the email you set is admin@domain.com)
Title: Re: Changing Default Email Address
Post by: metallicgloss on March 03, 2015, 09:34:56 AM
No,I own the domain EncryptedLaser.com and I have set the email up. I have also set up the mail server on the standard mail settings. It is sending the emails using a default domain that is something like linuxweb1.com or something like that, the issue is, is that email goes straight to spam for everyone.
Title: Re: Changing Default Email Address
Post by: margarett on March 03, 2015, 09:45:26 AM
Yes, with that settings that will happen...

You need to properly configure your mail server to respect the sender email PHP passes it. Then you need to make sure that your domain as properly set MX records (can you email yourself?)
That's really a server configuration problem, you should talk to your host about it...
Title: Re: Changing Default Email Address
Post by: metallicgloss on March 04, 2015, 02:30:43 AM
What do you means bout setting my mx records. The email on its own works fine but when I put the settings into the settings it ignores it and overrides the default email. If I were going to ask my host what would I ask as I have no idea why it does that.
Title: Re: Changing Default Email Address
Post by: margarett on March 04, 2015, 06:32:53 AM
You should try a simple PHP script (out of SMF) to send an email. Eg:
Code: [Select]
<?php
  
  
//Email information
  
$admin_email "sender@example.com"//put here the same email as you have in SMF
  
$email 'destination@example.com'//put here the destination email (eg: a personal email account you have)
  
$subject 'Test email subject';
  
$comment 'Test email body';
  
  
//send email
  
mail($admin_email$subject$comment'From:' $email);
  
  echo 
'done';
?>
And see if you receive the email.
Title: Re: Changing Default Email Address
Post by: metallicgloss on March 05, 2015, 02:37:12 AM
Ok, thanks. Could you help a bit again as I'm new to coding. Where would I put that code and what should I call the file?
Title: Re: Changing Default Email Address
Post by: margarett on March 05, 2015, 04:43:01 AM
You should put that code in a file named, eg, "test.php" and put it in your public_html folder. Then run it via browser --> www.yourdomain.com/test.php
It should just say "done"
Title: Re: Changing Default Email Address
Post by: Illori on March 05, 2015, 05:24:10 AM
for testing email i tend to use this script

Code: [Select]
<?php
$from_name 
"name";
$from_email "name@name.com";
$headers "From: $from_name <$from_email>";
$body "Hi, \nThis is a test mail from $from_name <$from_email>.";
$subject "Test mail from localhost";
$to "name2@name.com";


if (
mail($to$subject$body$headers)) {
   echo 
"success!";
} else {
   echo 
"fail…";
}
?>

it works well for me, it also tells me if it is a success or failure.
Title: Re: Changing Default Email Address
Post by: metallicgloss on March 05, 2015, 08:24:42 AM
Ok, tried both codes and it sends. But it doesn't send via my set email, it sends from linuxweb1.nitrous-networks.com
Title: Re: Changing Default Email Address
Post by: Illori on March 05, 2015, 08:29:07 AM
then i would suggest you contact your host and ask them about it.
Title: Re: Changing Default Email Address
Post by: metallicgloss on March 05, 2015, 08:32:43 AM
Ok, I will do.
Title: Re: Changing Default Email Address
Post by: metallicgloss on March 15, 2015, 09:42:40 PM
No luck, my host doesn't have any other ideas.
Title: Re: Changing Default Email Address
Post by: Illori on March 16, 2015, 05:22:14 AM
if your host cant figure out how to fix their config, then maybe time to move to another host.
Title: Re: Changing Default Email Address
Post by: margarett on March 16, 2015, 07:21:42 AM
^^ This. It's *really* strange that your host doesn't know what to do...

Anyway, your other possibility is to set up a different server for managing your mail exchange and configure SMF to use SMTP through it. I did it in a forum I'm helping out:
- buy the service at a given provider (we used hushmail, Gmail is also able to handle your domain, many others exist)
- reconfigure your DNS so that the MX records point at the new mail provider
- configure SMF to use SMTP with this provider.

It's an extra cost, of course.