I use PHP Swift mailer to send around 2000 emails in one go. I just wonder if there is a chance to find out:
Who have received?
Who have not received?

Any idea?


Recommended Answers

All 5 Replies

Just allow the email to have html formatting then place an invisible iframe that links to your website and you can then use that iframe to use $_GET to say that the email has been recieved. An example is the following:

<iframe width=1 height=1 src='http://www.yousite.com/email.php?id=195'></iframe>

So when your email.php file recieves that $_GET command it then knows that the email with the id 195 has been opened. And of course you will need to keep a database of which id's are associated with which emails.

As not everyone opens emails, email still has been sent. It is still TRUE.
I am looking for FALSE which means that mail hasn't been delivered to an email address.

What about putting it into a if statement like the following:

if (mail($to,$subject,$message,$headers)) {
//message sent
} else {
//message failed to send

Also if you want to check each email individually then you can put the mail function inside a foreach loop.

commented: Good idea +1

I have used if statement to check if something went wrong then written email address into a txt file. As it is stated in swiftmailer.org
Thank guys

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.