Email testingForwarding

Forwarding email

Learn how to forward individual emails as well as setting up automatic forwarding rules to send messages outside of Mailosaur.

Teams often need to forward emails onto an email address outside of Mailosaur. For example, to send messages to colleagues for further review/analysis, or to test email handling functionality within an product.

You can forward messages from your Mailosaur account to external email addresses either one-by-one, or via the creation of automated forwarding rules.

Before you can forward messages, you must first verify external email addresses so that you can send email to them.

Forwarding individual emails

You can forward emails within the Mailosaur Dashboard, or via the API:

  1. Open one of your emails within the Mailosaur Dashboard.
  2. Click the Forward button, at the top of the screen.
  3. Select the email address to send to. You can only send to verified external email addresses.
  4. Enter the message body for the forwarded email (Note: this field supports Markdown syntax.)
  5. When you are finished, click Send Message.
// MESSAGE_ID: The `id` of the message you want to forward
await mailosaur.messages.forward('{MESSAGE_ID}', {
  to: 'someone@example.com', // must be a verified address
  html: '<p>Hello world.</p>'
});
// MESSAGE_ID: The `id` of the message you want to forward
cy.mailosaurForwardMessage('{MESSAGE_ID}', {
  to: 'someone@example.com', // must be a verified address
  html: '<p>Hello world.</p>'
});
recipient = "someone@example.com" # must be a verified address
body = "<p>Hello world.</p>"
options = MessageForwardOptions(recipient, html=body)

# MESSAGE_ID: The `id` of the message you want to forward
mailosaur.messages.forward("{MESSAGE_ID}", options)
MessageForwardOptions options = new MessageForwardOptions();
options.withTo("someone@example.com") // must be a verified address
  .withHtml("<p>Hello world.</p>");

// MESSAGE_ID: The `id` of the message you want to forward
mailosaur.messages().forward("{MESSAGE_ID}", options);
// MESSAGE_ID: The `id` of the message you want to forward
mailosaur.Messages.Forward("{MESSAGE_ID}", new MessageForwardOptions() {
    To = "someone@example.com", // must be a verified address
    Html = "<p>Hello world.</p>"
  }
);
options = Mailosaur::Models::MessageForwardOptions.new()
options.to = 'someone@example.com' # must be a verified address
options.html = '<p>Hello world.</p>'

# MESSAGE_ID: The `id` of the message you want to forward
mailosaur.messages.forward('{MESSAGE_ID}', options)
$options = new MessageForwardOptions();
$options->to = 'someone@example.com'; // must be a verified address
$options->html = '<p>Hello world.</p>';

// MESSAGE_ID: The `id` of the message you want to forward
$mailosaur->messages->forward('{MESSAGE_ID}', $options);
// MESSAGE_ID: The `id` of the message you want to forward
m.Messages.Forward("{MESSAGE_ID}", &MessageForwardOptions{
  To:   "someone@example.com", // must be a verified address
  Html: "<p>Hello world.</p>",
})

Forwarding rules

Forwarding rules allow messages to be automatically forwarded based on a set of criteria that you can configure, per server.

This feature is only available on our Business, Professional and Enterprise plans.

When a message is received by Mailosaur the forwarding rules are checked and, if there is a match, the message will automatically be sent to the email addresses specified in the rule.

With forwarding rules, messages are forwarded without alteration, to give an accurate representation of how they were received by Mailosaur.

Creating forwarding rules

Forwarding rules can be setup for any server, by following these steps:

  1. Go to the Servers page in the Mailosaur Dashboard.
  2. Click on a server.
  3. Click the server settings button
  4. Click on Forwarding Rules.
  5. Click the Add rule button.
  6. Click the Add condition button to build a condition that must be met, in order for the rule to be matched. Repeat this step until you have finished adding conditions. Where multiple conditions are added, all those conditions must be met. If you instead need any condition to be met, then use multiple rules instead.
  7. Select the email addresses you wish to forward messages to when the rule is matched. You can only forward to verified external email addresses.
  8. Repeat steps 5-7 to add additional rules.

Deleting forwarding rules

Once a forwarding rule is deleted, no further messages will be forwarded. Rules cannot be restored once they are deleted, and would have to be created again.

  1. Go to the server containing the forwarding rule you want to delete.
  2. Click the server settings button
  3. Click on Forwarding Rules.
  4. Locate the rule you want to delete and click the Delete rule button. Repeat this step for any other rules you want deleted.