---
title: How to change Sender Details?
description: "Magic Login uses the WordPress `wp_mail` functionality to send emails. If you need to change the sender details (like the \"From\" name and email address), you can easily do this by using a third-party SMTP plugin. Using a proper SMTP…"
url: "https://handyplugins.co/docs/how-to-change-sender-details/"
updated: "2024-07-03"
category: Magic Login Pro
---

# How to change Sender Details?

Magic Login uses the WordPress `wp_mail` functionality to send emails. If you need to change the sender details (like the "From" name and email address), you can easily do this by using a third-party SMTP plugin. Using a proper SMTP service is also recommended for better email deliverability. These services ensure your emails are less likely to end up in the spam folder.

## Recommended SMTP Plugins

- WP Mail SMTP - [https://wordpress.org/plugins/wp-mail-smtp/](https://wordpress.org/plugins/wp-mail-smtp/)
- FluentSMTP - [https://wordpress.org/plugins/fluent-smtp/](https://wordpress.org/plugins/fluent-smtp/)
- Post SMTP - [https://wordpress.org/plugins/post-smtp/](https://wordpress.org/plugins/post-smtp/)

## Changing Sender Details via Hook

If you prefer to change the sender details programmatically, you can use the `wp_mail_from` and `wp_mail_from_name` hooks in WordPress. Add the following code to your theme's `functions.php` file or a custom plugin:

```
// Change the sender email address
add_filter( 'wp_mail_from', 'custom_wp_mail_from' );
function custom_wp_mail_from( $original_email_address ) {
    return 'your-email@example.com'; // Replace with your sender email address
}

// Change the sender name
add_filter( 'wp_mail_from_name', 'custom_wp_mail_from_name' );
function custom_wp_mail_from_name( $original_email_from ) {
    return 'Your Name'; // Replace with your sender name
}
```

By using these plugins or the code snippet above, you can easily customize the sender details for emails sent by Magic Login
