Set email headers so bounced emails go to a specific address

I just figured this out myself in exim4 after a lot of reading about exim configuration. First, you want your app to add the following header: Return-Path: <bounced@yourdomain.com> Works with or without brackets. Exim will add brackets in the end either way. Second, this was the hard part. Exim always wanted to override my Return-Path: … Read more

How to check if an email address is real or valid using PHP

You should check with SMTP. That means you have to connect to that email’s SMTP server. After connecting to the SMTP server you should send these commands: HELO somehostname.example MAIL FROM: <no-reply@gmail.com> RCPT TO: <emailtovalidate@domain.example> If you get “<emailtovalidate@domain.example> Relay access denied” that means this email is Invalid. There is a simple PHP class. You … Read more

What is the behavior difference between return-path, reply-to and from?

Let’s start with a simple example. Let’s say you have an email list, that is going to send out the following RFC2822 content. From: <coolstuff@mymailinglist.example> To: <you@example.com> Subject: Super simple email Reply-To: <coolstuff-threadId=123@mymailinglist.example> This is a very simple body. Now, let’s say you are going to send it from a mailing list, that implements VERP … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)