Please add following condition.
$mailSent = get_user_meta($us_id, 'mail_sent', true);
if($mailSent){
update_user_meta($us_id, 'mail_sent', 'mail sent');
}else{
$borrower_mail=wp_mail($to, $subject, $body);
}
Related Posts:
- How do you update user_email on the front end in WP 3.3?
- Get basic Image Uploader on User Profile Page
- How to display user’s avatar on their profile page?
- add custom field in user register form
- Prevent update of custom user profile meta field on the front end after 1st entry
- action user_new_form param is a string
- How do I add a dropdown list of numbers 1 – 1000 as an extra profile field?
- Using xprofile_insert_field
- How to order custom fields in the user profile (admin area)
- Remove fields from WordPress profile
- How $_GET[‘updated’] variable is passed when updating a user?
- How do I update user email from frontend input field?
- how to save multiple checkbox in usermeta and get it?
- How to gets users EMAIL by their USERNAME
- use single form to enter multiple profiles
- user profile replace first name last name with custom values
- How to create a front end user profile with a friendly permalink
- How to get a buddypress user profile link and a certain user profile field for the current post author?
- Return all users with a specific meta key
- Capabilities Vs User Meta
- Where the Nickname is being used in WordPress
- get_users is expecting unserialized meta_value
- How to get user metadata for social media url?
- Check if WP_User_Query ‘include’ is empty
- Connect Users and Taxonomies
- User meta to post
- How to add usermeta to “Notice of Email Change” email message
- Add profile field (usermeta) to Add New User
- How to Make admin Sidebar Menu always be Collapse by code
- Extra User Profile Field Upload File / Image
- Drop down list in user profile page
- Can I create front-end editable user profile pages with WordPress? How do I do it?
- How to query users by meta value, even when meta key doesn’t exist?
- Allow role to edit users at lower level with only specific metadata
- Hook or action to save profile fields at specific time
- Multiple User-Meta Values in One User-Meta Key
- Possible bug: update_user_meta is updating two unique meta entries
- Update user meta through a front end form
- How to display current_user bio
- Is a user_meta research case-sensitive or not
- Can I prevent “wp_user_level” from getting added to wp_usermeta on registration?
- How to tell whether a user meta value has increased or decreased [closed]
- Why get_users() not working on the admin backend?
- Can I set user meta for theoretical user 0?
- strange issue with user_meta + json_encode/decode
- Inserting and finding multiple values in user-meta fields
- Update user meta on logout
- I want to update my user meta table
- Subscribers Group User meta delete
- Redirecting users based on custom user meta
- Frontend Image Upload
- How to position user meta data field
- Get user meta for only the keys with a certain prefix
- How to pull user/author profile data in a plugin?
- Fetch user related data
- Generate email on meta value update
- Order By Meta_key but convert custom date to Y-m-d first
- Show image if author meta (profile fields) exists outside loop
- Combining wp_list_authors with get_user_meta
- Using WP for user management
- Show extra user profile meta for current user
- Pulling member name from WordPress URL
- Send admin new order email to logged in user as well
- Should I have a single cron job that loops the users, or one for each user?
- Add user meta after a user has registered and logged In [closed]
- E-mail Update – Validation
- Parsing a shortcode through an author meta textfield
- Display Country Flag in Profile WordPress/Buddypress
- gform_after_submission not working as expected [closed]
- Remove user id’s stored in arrays that themselves are stored in user meta of another user
- How to parse a huge list of users using a CRON function?
- Sort users by meta key value even if meta key not present for all users
- Fetch user’s using Last Name
- How to get metadata (in my case mail) of users who have a certain set of metadata?
- How can I search user meta by a partial key name?
- get_user_meta value is stored within strange characters
- Why is my Custom User Meta deleted on Profile Update?
- wp_redirect not working after update_user_meta
- profile_update works on second update only
- How to remove the url format from the WEBSITE field in the user registry?
- users joined group count in buddypress
- How can i add user display name drop down menu in frontend?
- Edit a user profile field on front end
- SQL – Shorter way to query user and usermeta data
- WP author meta disappeared
- Changing an array of IDs in the usermeta table to fit different format
- Storing data to database and user registration
- Require confirmation of current user’s email before updating database and before send_email_change_email
- Creating multiple profiles under one user to assign to particular posts
- update_user_meta(): invisible data storage
- get user role value as a string from wp usermeta table into custom script
- Get currentuserinfo firstname and lastname
- Create a dropdown list displaying users meta data
- Multidimensional array problem with update_post_meta [duplicate]
- User profile update author
- Display all existing members
- Using IDX feed to display agent’s and listings with agent’s info associated for Real Estate Website
- CRM and newsletter integration? [closed]
- Custom user meta data [closed]
- Can’t display user bio