   end
 
   setup_all do
-    valid_email = Swoosh.Email.new(
-      from: "tony.stark@example.com",
-      to: "steve.rogers@example.com",
-      subject: "Hello, Avengers!",
-      html_body: "<h1>Hello</h1>",
-      text_body: "Hello"
-    )
+    valid_email =
+      Swoosh.Email.new(
+        from: "tony.stark@example.com",
+        to: "steve.rogers@example.com",
+        subject: "Hello, Avengers!",
+        html_body: "<h1>Hello</h1>",
+        text_body: "Hello"
+      )
+
     {:ok, valid_email: valid_email}
   end
 

    System.put_env("MAILER_TEST_SMTP_PASSWORD", "passwordenv")

    Application.put_env(:swoosh, Swoosh.MailerTest.EnvMailer,
      [username: {:system, "MAILER_TEST_SMTP_USERNAME"},
       password: {:system, "MAILER_TEST_SMTP_PASSWORD"},
       relay: "smtp.sendgrid.net",
       tls: :always])

    defmodule EnvMailer do
      use Swoosh.Mailer, otp_app: :swoosh, adapter: FakeAdapter

    assert_raise DeliveryError, "delivery error: expected \"from\" to be set", fn ->
      Map.put(valid_email, :from, nil) |> FakeMailer.deliver!()
    end

    assert_raise DeliveryError, "delivery error: expected \"from\" to be set", fn ->
      Map.put(valid_email, :from, {"Name", nil}) |> FakeMailer.deliver!()
    end

    assert_raise DeliveryError, "delivery error: expected \"from\" to be set", fn ->
      Map.put(valid_email, :from, {"Name", ""}) |> FakeMailer.deliver!()
    end
