Knowledgebase

Sending Email from Your Application Print

  • developersgitdeployment, developers, email, domain, troubleshooting, cpanel, smtp, spam, spf, dkim
  • 0

Making sure application mail arrives.

THE PROBLEM WITH DEFAULT SENDING

Most applications default to PHP's mail function. Messages sent that way frequently fail authentication and land in spam.

THE FIX

Send through SMTP using a real mailbox on your domain.

  1. Create a mailbox such as [email protected].
  2. Configure your application's mail settings: host mail.yourdomain.com, port 465 with SSL or 587 with TLS, authentication enabled, the full address as username.
  3. Set the From address to that mailbox.

THE FROM ADDRESS RULE

Always send from an address on your own domain. A contact form sending from the visitor's Gmail address fails authentication and is the most common reason submissions never arrive.

Put the visitor's address in Reply-To instead.

AUTHENTICATION RECORDS

Confirm SPF and DKIM are correct in cPanel > Email Deliverability.

FOR VOLUME

Use a dedicated provider: SendGrid, Brevo, Mailgun. Shared hosting has hourly sending limits that will interrupt bulk sending.

TESTING

Send to Gmail and another provider, and check the headers for authentication results.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot