Prompt
How do I set up Notify to send email from my application?
Latest observation
If you mean Laravel Notifications (“Notify”) sending email, the setup is usually:
1) Configure your mail settings
In .env:
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=587
MAIL_USERNAME=your_username
MAIL_PASSWORD=your_password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=no-reply@example.com
MAIL_FROM_NAME="${APP_NAME}"
Then in config/mail.php, make sure it reads from those env values (Laravel does this by default).
2) Create a notification
php artisan make:notification OrderShipped
Inside the notification, define the email content:
use Illuminate\Notifications\Messages\MailMessage;
public function via($notifiable)
{
return ['mail'];
}
public function toMail($notifiable)
{
return (new MailMessage)
->subject('Your order has shipped')
->greeting('Hello!')
->line('Your order has been shipped.')
->action('View Order', url('/orders/123'))
->line('Thanks for using our application!');
}
3) Make your model notifiable
Usually your User model already includes it:
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
use Notifiable;
}
And it should have an email field.
4) Send the notification
$user->notify(new OrderShipped());
Or:
Notification::send($users, new OrderShipped());
5) If you want queueing
Implement ShouldQueue on the notification:
use Illuminate\Contracts\Queue\ShouldQueue;
class OrderShipped extends Notification implements ShouldQueue
{
...
}
6) Test it
Use a local mail tool like:
- Mailtrap
- Mailhog
- Mailpit
If you meant a different “Notify” package/library, tell me which one and I’ll give the exact setup steps.
Observation history
Unlock observation history
Create a free Obsurfable account to unlock historical responses, model comparisons, and deeper brand intelligence.
How did Obsurfable measure this prompt?
Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.
Which AI systems does Obsurfable collect answers from?
OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, and Meta AI.