How to foward mails from wordpress

There are a few ways to forward emails from a WordPress website:

Method 1: Using a plugin

  1. Install and activate a plugin like "Email Forwarder" or "WP Email Forwarder" from the WordPress plugin directory.
  2. Configure the plugin to forward emails from a specific email address or domain to another email address.
  3. Set up the forwarding rules according to your needs.

Method 2: Using a contact form plugin

  1. Install and activate a contact form plugin like "Contact Form 7" or "Gravity Forms".
  2. Configure the plugin to send emails to a specific email address.
  3. Set up the plugin to forward emails to another email address using the plugin's built-in forwarding feature.

Method 3: Using a third-party email service

  1. Set up an email service like Mailgun, Sendinblue, or Amazon SES to receive emails on behalf of your WordPress website.
  2. Configure the email service to forward emails to another email address.
  3. Update your WordPress website's email settings to use the third-party email service.

Method 4: Using PHP code

  1. Add the following code to your WordPress website's functions.php file:

    function forward_emails() {
     $from_email = '[email protected]';
     $to_email = '[email protected]';
     $subject = 'Forwarded email';
     $message = 'This is a forwarded email';
    
     wp_mail($to_email, $subject, $message, 'From: '. $from_email);
    }
    add_action('wp_mail', 'forward_emails');

    Replace [email protected] with the email address you want to forward from, and [email protected] with the email address you want to forward to.

Method 5: Using a WordPress theme

  1. Check if your WordPress theme has a built-in email forwarding feature.
  2. Configure the theme's email forwarding settings according to the theme's documentation.

Remember to test the email forwarding setup to ensure it's working correctly.