PHPMailer and email spam

Bucephalus

Beta member
Messages
2
Location
Australia
Hi Everyone.

I have a problem with my employer's website. Our account continues to be suspended only after a day or two. The reason being that our website seems to be sending spam email. First I thought the host was talking about our email accounts that it is hosting, but now I understand that our website, not our email server is sending emails. See this excerpt from an email from our webhost.

Please check the script of files below:

/public_html/wp-includes/class-phpmailer.php
/public_html/wp-includes/class-pop3.php
/public_html/wp-includes/class-smtp.php


So now, at the moment, we don't have a form on our website, so we have no reason to have an email facility. I would like to disable this PHPMailer so we can at least see if this problem disappears after we disable it.

Does anyone have any advice on how I would disable it?

regards
David.
 
to disable it you can just remove those files that are sending out spam.

In this case it's the one with the mailer functions:
/public_html/wp-includes/class-phpmailer.php
/public_html/wp-includes/class-pop3.php
/public_html/wp-includes/class-smtp.php


but a better way of doing it would be like this:

first create a file called env.php
inside this file put the following code
Code:
<?php
phpinfo()
?>

This should tell you where your php.ini file is.

Inside that file (search for the section where functions are setup)
and add the line

Code:
disabled_functions = mail

I'm guessing that you've just installed something (in this case Wordpress) out of the box in order to get a website up and running quickly. the trouble with doing that is often you will have functions enabled that you really don't need.
 
Back
Top Bottom