Are there best practices for ensuring that emails sent using @mysql_query() are delivered promptly?

When using the @mysql_query() function to send emails in PHP, it is important to make sure that the email is sent promptly by properly configuring the email server settings and ensuring that the email is not marked as spam. To improve email deliverability, consider using a dedicated email service provider or SMTP server to send emails.

// Example of sending an email using @mysql_query() with improved deliverability
$to = "recipient@example.com";
$subject = "Test Email";
$message = "This is a test email sent using @mysql_query()";
$headers = "From: sender@example.com\r\n";

// Send email using dedicated SMTP server
ini_set("SMTP", "smtp.example.com");
ini_set("smtp_port", "25");

@mail($to, $subject, $message, $headers);