You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
apiKey: $_ENV['MAILTRAP_API_KEY'] #your API token from here https://mailtrap.io/api-tokens
);
$email = (new MailtrapEmail())
->from(new Address('example@YOUR-DOMAIN-HERE.com', 'Mailtrap Test')) // <--- you should use your domain here that you installed in the mailtrap.io admin area (otherwise you will get 401)
->to(new Address('email@example.com', 'Jon'))
->subject('Hello from Mailtrap!')
->text('Welcome to Mailtrap Sending!')
;
$response = $mailtrap->send($email);
var_dump(ResponseHelper::toArray($response)); // body (array)