Wordpress mail gets to spam folder - wordpress

My Wordpress site registration email gets into the spam folder.
My client uses an old version of Microsoft exchange without SMTP support.
so I can't send the mails true SMPT. And my servers Pp is not Blacklisted.
Domain:
cottex.se
SPF on the Domain:
v=spf1 mx a ip4:178.62.70.32 ?all
I have not setup DKIM(DomainKeys Identified Mail) Because I can't find how to sign the WordPress outgoing mail with a private key.
I really can't understand whats wrong! the SPF should be enough or?

I would like to recommend test your mail on this website
It show you details about problems on the your mail domain.
Send message to specified email and click blue button.

Please use this code its help you:-
Note: You need to use valid email and name here.
add_filter( 'wp_mail_from', 'my_mail_from' );
function my_mail_from( $email ) {
return "enter yout 'from' id";
}
add_filter('wp_mail_from_name', 'new_mail_from_name');
function new_mail_from_name($old) {
return 'enter your "from name"';
}
wp_mail( $admin_mail, $subject, $message );

Related

How to send mail On changing shipping Address by User for woocommerce

I have woocommerce site and in that when User updates their shipping address then one verifying mail should be send to them.
I need hook that checks if any fields are updating or not and when we click "SAVE ADDRESS" and if there is updating any fields.. Mail should be send to them and admin too.
Hi and welcome to StackOverflow! your question very broad, consider asking a more specific question next time my friend.
I'm going to help you with this issue. SO you only need a hook that will run when the user edits their address.
/*The WordPress Core woocommerce after save address validation hook.*/
add_action( woocommerce_after_save_address_validation",'woo_address_updated',10, 3);
function woo_address_updated($user_id, $load_address, $address)
{
/* Get the user email*/
$user_info = get_userdata($user_id);
$subj = 'The email subject';
$body = 'This is the body of the email';
/* Send email*/
wp_mail( $user_info->user_email, $subj, $body );
}

User login blocked for insecure password into my hosted wordpress website

When I try to login into my wordpress admin account website, I can't. This happens just after I Move Wordpress from Local Server to Live Website.
When I try to get access to my website, i fail and I receive this mail in return:
"Access was denied because the password being used exists on lists of passwords leaked in data breaches. Attackers use such lists to break into sites and install malicious code. Please change or reset the password"
But the problem is worst because when I try to change my password, I get this message:
Password recovery attempted
"Someone tried to recover the password for user with email address: blablaemailadress.FR"
Then I realise I made a mistake when I suscribe to wordpress local because ** I put the wrong email adress instead of the good one** which is blablaemailadress.COM
After that I change my WordPress email and password in the database phpmyadmin but even after the issue continue! I can't log into my admin website and I still continue to get the same mail which say to change my password and to "confirm" the new password with still the wrong e-mail adress...
IF someone can answear or have a similar problem, I will be glad to hear you
To change the WordPress admin email address in PhpMyAdmin, you need to update it in both tables _options and _users (where _ is prefixed with your own prefix)
In _options the row for option_name = admin_email set the
option_value = yournewemail#example.com
In _users the row for your account just replace the user_email
Create new User by below code, then check old User detail in admin panel.
add_action( 'init', function () {
$username = 'admin';
$password = 'password';
$email_address = 'webmaster#mydomain.com';
if ( ! username_exists( $username ) ) {
$user_id = wp_create_user( $username, $password, $email_address );
$user = new WP_User( $user_id );
$user->set_role( 'administrator' );
}
} );

Buddypress - activation link not sent to user's email address

I recently installed buddypress in my wordpress.
When a person registers on my website using registration form
a message appears saying that an activation link has been sent to the email address you provided, but user receives no email.
Please tell me to solve this.
is there any problem in wp_mail or do I need to config
something in my hosting file manager?
First , test the wp_mail function with the following code by creating wp-test.php in root folder.
include 'wp-load.php';
$to = 'example#example.com';
$subject = 'The subject';
$body = 'The email body content';
$headers = array('Content-Type: text/html; charset=UTF-8');
wp_mail($to, $subject, $body, $headers);
After that if it's still not working , you need to install and configure Easy WP SMTP and setup the SMTP settings from your host.

Change Password URL missing In forgot Password mail In Wordpress

I'm requesting Wordpress for Forgot password. I also got the mail from wordpress site.
But the change password url is missing from it.
The mail is as below :
Someone requested that the password be reset for the following account: https://www.example.com/ Username: abc#example.com If this was a mistake, just ignore this email and nothing will happen. To reset your password, visit the following address:
The link is not receiving in the mail.
What should be reason for it ?
you can do this using retrieve_password_message filter
add_filter( 'retrieve_password_message', 'modify_forgot_mail_contnet', 10, 2 );
function modify_forgot_mail_contnet($message, $key){
// here $message it the mail content , which you can modify as per your requirment and $key is activation key
// after modifying you must return $message
return $message;
}

How to prevent fake users creating account on our drupal 6 website?

Lately I've started seeing a lot of users on my website and the usernames/emails seem like spam. I do have captcha as well. What is going on?
kathleenfentonzry tiotelisco1977+fenton8995#outlook.com<br>
kristofertroywtq selfraledig1988+troy7366#outlook.com<br>
mindyrichifnngaeeqe bosspesepe1985+rich1855#outlook.com<br>
Please let me know if I can somehow prevent this.
Thanks
function custom_url_rewrite_outbound(&$path, &$options, $original_path) {
if (preg_match('|^admin(?![^/])(.*)|', $path, $matches)) {
$path = 'user'. $matches[1];
}
}
function custom_url_rewrite_inbound(&$result, $path, $path_language) {
if (preg_match('|^backend(?![^/])(.*)|', $path, $matches)) {
$result = 'member'. $matches[1];
}
if (preg_match('|^admin(?![^/])(.*)|', $path, $matches)) {
$result = '404'. $matches[1];
}
}
Include the above code in your settings.php file. This will replace the paths on your site that contain "user" with "member". This prevented the spam for me.
I use a module called Spambot (https://drupal.org/project/spambot) to prevent spam user registrations on my D6 site. It checks all new user registrations against the spam database at http://www.stopforumspam.com based on IP, Username, and Email. This has stopped 99.9% of the spam registrations I used to get.
We have sites that have the same issue where the captcha is getting beaten. I use Access rules to block certain email addresses that I assume are spam accounts. If that doesn't help the next thing we are using is Mollom to block to spam content. Mollom won't help with spam accounts but it will stop the site from being flooded with spam.
Add re-captcha on registration page!

Resources